{"action":"created","issue":{"url":"https://api.github.com/repos/cincheo/jsweet/issues/58","repository_url":"https://api.github.com/repos/cincheo/jsweet","labels_url":"https://api.github.com/repos/cincheo/jsweet/issues/58/labels{/name}","comments_url":"https://api.github.com/repos/cincheo/jsweet/issues/58/comments","events_url":"https://api.github.com/repos/cincheo/jsweet/issues/58/events","html_url":"https://github.com/cincheo/jsweet/issues/58","id":133162133,"number":58,"title":"Bundle option produces empty .js file?","user":{"login":"sykesd","id":1282090,"avatar_url":"https://avatars.githubusercontent.com/u/1282090?v=3","gravatar_id":"","url":"https://api.github.com/users/sykesd","html_url":"https://github.com/sykesd","followers_url":"https://api.github.com/users/sykesd/followers","following_url":"https://api.github.com/users/sykesd/following{/other_user}","gists_url":"https://api.github.com/users/sykesd/gists{/gist_id}","starred_url":"https://api.github.com/users/sykesd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sykesd/subscriptions","organizations_url":"https://api.github.com/users/sykesd/orgs","repos_url":"https://api.github.com/users/sykesd/repos","events_url":"https://api.github.com/users/sykesd/events{/privacy}","received_events_url":"https://api.github.com/users/sykesd/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cincheo/jsweet/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-02-12T05:40:24Z","updated_at":"2016-02-15T09:50:01Z","closed_at":null,"body":"We are evaluating JSweet for use as a development platform for web apps. We are relatively new to Javascript, but have strong Java experience.\r\n\r\nUsing the Eclipse plugin I followed the \"from a blank project\" quick start and produced a working example. I then added a model class and enabled the bundle option to produce a single combined Javascript class. All very good.\r\n\r\nNext I added the jquery (1.10.2) \"candie\" to the project and attempted to use it from my sample code. When I did that the produced bundle-helloworld.js file is completely empty. But there are no error messages.\r\nAll of the intermediate files look correct and are generated.\r\n\r\nWhy is no error message produced?\r\n\r\nHow do I go about fixing the problem?\r\n\r\nWhere exactly should I place the jquery.js file?\r\n\r\nHere is my main class:\r\n```\r\npackage helloworld;\r\n\r\nimport static def.jquery.Globals.$;\r\nimport static jsweet.dom.Globals.alert;\r\nimport static jsweet.dom.Globals.document;\r\nimport static jsweet.util.StringTypes.table;\r\nimport static jsweet.util.StringTypes.td;\r\nimport static jsweet.util.StringTypes.tr;\r\nimport jsweet.dom.HTMLElement;\r\nimport jsweet.dom.HTMLTableDataCellElement;\r\nimport jsweet.dom.HTMLTableElement;\r\nimport jsweet.dom.HTMLTableRowElement;\r\nimport jsweet.lang.Array;\r\n\r\nimport com.acme.model.Part;\r\n\r\npublic class HelloWorld {\r\n\r\n  public static void main(String[] args) {\r\n    alert(\"This will append the parts table in the document!\");\r\n  \r\n    Array<Part> parts = buildParts();\r\n    HTMLTableElement partsTable = document.createElement(table);\r\n    for (Part part : parts) {\r\n      HTMLTableRowElement row = document.createElement(tr);\r\n      row.appendChild( stringCell(part.getPartno()) );\r\n      row.appendChild( stringCell(part.getDescription()) );\r\n      row.appendChild( numberCell(part.getQty()) );\r\n      partsTable.appendChild(row);\r\n    }\r\n    \r\n    $(document).ready(() -> {\r\n      HTMLElement e = $(\"target\").get(0);\r\n      e.appendChild(partsTable);\r\n      return null;\r\n    });\r\n  }\r\n\r\n  private static Array<Part> buildParts() {\r\n    Array<Part> parts = new Array<Part>();\r\n    parts.push( new Part(\"707123\", \"Fry basket, wire\", 2) );\r\n    parts.push( new Part(\"623457\", \"Fryer, 3 Vat, Gas\", 3) );\r\n    return parts;\r\n  }\r\n  \r\n  private static HTMLTableDataCellElement stringCell(String s) {\r\n    HTMLTableDataCellElement cell = document.createElement(td);\r\n    cell.innerText = s;\r\n    return cell;\r\n  }\r\n  \r\n  private static HTMLTableDataCellElement numberCell(Double n) {\r\n    HTMLTableDataCellElement cell = document.createElement(td);\r\n    cell.innerText = n.toString();\r\n    return cell;\r\n  }\r\n}\r\n```\r\n\r\nHere is my model class:\r\n```\r\npackage com.acme.model;\r\n\r\npublic class Part {\r\n\r\n  private String partno;\r\n  \r\n  private String description;\r\n  \r\n  private double qty;\r\n\r\n  public Part(String partno, String description, double qty) {\r\n    this.partno = partno;\r\n    this.description = description;\r\n    this.qty = qty;\r\n  }\r\n  \r\n  public String getPartno() {\r\n    return partno;\r\n  }\r\n\r\n  public void setPartno(String partno) {\r\n    this.partno = partno;\r\n  }\r\n\r\n  public String getDescription() {\r\n    return description;\r\n  }\r\n\r\n  public void setDescription(String description) {\r\n    this.description = description;\r\n  }\r\n\r\n  public double getQty() {\r\n    return qty;\r\n  }\r\n\r\n  public void setQty(double qty) {\r\n    this.qty = qty;\r\n  }\r\n  \r\n}\r\n```\r\n\r\nHere is the index.html:\r\n```\r\n<!DOCTYPE html>\r\n<html>\r\n  <head>\r\n    <meta charset=\"UTF-8\">\r\n    <title>Hello world</title>\r\n  </head>\r\n  \r\n  <body>\r\n    <div id=\"target\"></div>\r\n    <script type=\"text/javascript\" src=\"../../js/helloworld/bundle-helloworld.js\"></script>\r\n  </body>\r\n</html>\r\n```\r\n\r\nFinally, here is the pom.xml:\r\n```\r\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\r\n  <modelVersion>4.0.0</modelVersion>\r\n  <groupId>learn-jsweet</groupId>\r\n  <artifactId>learn-jsweet</artifactId>\r\n  <version>0.0.1-SNAPSHOT</version>\r\n  <!-- repositories -->\r\n  <repositories>\r\n    <repository>\r\n      <id>jsweet-central</id>\r\n      <name>libs-release</name>\r\n      <url>http://repository.jsweet.org/artifactory/libs-release-local</url>\r\n    </repository>\r\n    <repository>\r\n      <snapshots />\r\n      <id>jsweet-snapshots</id>\r\n      <name>libs-snapshot</name>\r\n      <url>http://repository.jsweet.org/artifactory/libs-snapshot-local</url>\r\n    </repository>\r\n  </repositories>\r\n  <!-- end repositories -->\r\n  <build>\r\n    <sourceDirectory>src</sourceDirectory>\r\n    <plugins>\r\n      <plugin>\r\n        <artifactId>maven-compiler-plugin</artifactId>\r\n        <version>3.1</version>\r\n        <configuration>\r\n          <source>1.8</source>\r\n          <target>1.8</target>\r\n        </configuration>\r\n      </plugin>\r\n    </plugins>\r\n  </build>\r\n  <dependencies>\r\n   <dependency>\r\n    <groupId>org.jsweet.candies</groupId>\r\n    <artifactId>jsweet-core</artifactId>\r\n    <version>1.0.0-SNAPSHOT</version>\r\n   </dependency>\r\n   <dependency>\r\n    <groupId>org.jsweet.candies</groupId>\r\n    <artifactId>jquery</artifactId>\r\n    <version>1.10.2</version>\r\n   </dependency>\r\n  </dependencies>\r\n</project>\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/cincheo/jsweet/issues/comments/184137161","html_url":"https://github.com/cincheo/jsweet/issues/58#issuecomment-184137161","issue_url":"https://api.github.com/repos/cincheo/jsweet/issues/58","id":184137161,"user":{"login":"renaudpawlak","id":6288061,"avatar_url":"https://avatars.githubusercontent.com/u/6288061?v=3","gravatar_id":"","url":"https://api.github.com/users/renaudpawlak","html_url":"https://github.com/renaudpawlak","followers_url":"https://api.github.com/users/renaudpawlak/followers","following_url":"https://api.github.com/users/renaudpawlak/following{/other_user}","gists_url":"https://api.github.com/users/renaudpawlak/gists{/gist_id}","starred_url":"https://api.github.com/users/renaudpawlak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/renaudpawlak/subscriptions","organizations_url":"https://api.github.com/users/renaudpawlak/orgs","repos_url":"https://api.github.com/users/renaudpawlak/repos","events_url":"https://api.github.com/users/renaudpawlak/events{/privacy}","received_events_url":"https://api.github.com/users/renaudpawlak/received_events","type":"User","site_admin":false},"created_at":"2016-02-15T09:50:01Z","updated_at":"2016-02-15T09:50:01Z","body":"Follow-up: it seems that I was wrong... npm should install also all dependencies when installing a package. So I am not sure of what happened but I have read on the Internet that in some contexts, the installation of dependencies fails. I am still investigating... "}}