{"action":"created","issue":{"url":"https://api.github.com/repos/aurelia/skeleton-navigation/issues/714","repository_url":"https://api.github.com/repos/aurelia/skeleton-navigation","labels_url":"https://api.github.com/repos/aurelia/skeleton-navigation/issues/714/labels{/name}","comments_url":"https://api.github.com/repos/aurelia/skeleton-navigation/issues/714/comments","events_url":"https://api.github.com/repos/aurelia/skeleton-navigation/issues/714/events","html_url":"https://github.com/aurelia/skeleton-navigation/pull/714","id":189002593,"number":714,"title":"feat(typescript-webpack-experimental): new experimental version of the webpack skeleton","user":{"login":"niieani","id":563469,"avatar_url":"https://avatars.githubusercontent.com/u/563469?v=3","gravatar_id":"","url":"https://api.github.com/users/niieani","html_url":"https://github.com/niieani","followers_url":"https://api.github.com/users/niieani/followers","following_url":"https://api.github.com/users/niieani/following{/other_user}","gists_url":"https://api.github.com/users/niieani/gists{/gist_id}","starred_url":"https://api.github.com/users/niieani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niieani/subscriptions","organizations_url":"https://api.github.com/users/niieani/orgs","repos_url":"https://api.github.com/users/niieani/repos","events_url":"https://api.github.com/users/niieani/events{/privacy}","received_events_url":"https://api.github.com/users/niieani/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":23,"created_at":"2016-11-13T23:11:42Z","updated_at":"2016-11-19T13:18:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/aurelia/skeleton-navigation/pulls/714","html_url":"https://github.com/aurelia/skeleton-navigation/pull/714","diff_url":"https://github.com/aurelia/skeleton-navigation/pull/714.diff","patch_url":"https://github.com/aurelia/skeleton-navigation/pull/714.patch"},"body":"This PR contains support of the Aurelia & Webpack duo, rewritten from scratch, **solving over 20 Webpack-related issues**, at the same time _deprecating_ these dependencies:\r\n\r\n- aurelia-webpack-plugin\r\n- aurelia-bootstrapper-webpack\r\n\r\nThey're simply no longer needed.\r\n\r\nNew features:\r\n- integrates @MeirionHughes' template linter out of the box\r\n- uses **jest** with the **aurelia-pal-nodejs** and the new **aurelia-loader-nodejs**, instead of **karma** for blazing fast, modern and easy unit testing\r\n- integrates and gives an example for testing with **aurelia-testing** (see `test/unit/welcome.spec.ts`)\r\n- leverages **jest**'s snapshot testing (in short: save rendered template HTML as text to a file, and then compare the rendered output with every run of the test; popular in the React circles), example also in the `welcome.spec.ts`\r\n- drops @easy-webpack configs in favor of a flat, yet still modular Webpack config file\r\n- Webpack now understands the dynamic nature of dependencies in Aurelia, thus the dependency graph is now very accurate. Aside from the old way of defining dependencies for Webpack, `aurelia.build.resources` in package.json which can still be used to define bundles, declaring dynamic dependencies is now much simpler, can can be achieved by simply placing a comment directly before the module ID literal. For example:\r\n  ```ts\r\n  aurelia.setRoot(/* @import */ 'app');\r\n   ```\r\n  There are two modifiers that you can add to the comment, `@lazy` and `@chunk('some-name')`:\r\n  ```ts\r\n  configureRouter(config: RouterConfiguration, router: Router) {\r\n    config.title = 'Aurelia';\r\n    config.map([\r\n      {\r\n        route: ['', 'welcome'], \r\n        moduleId: /* @import */ './welcome',\r\n        name: 'welcome', nav: true, title: 'Welcome'\r\n      },\r\n      {\r\n        route: 'users',\r\n        moduleId: /* @import @lazy @chunk('some-chunk') */ './users',\r\n        name: 'users', nav: true, title: 'Github Users'\r\n      },\r\n    ]);\r\n\r\n    this.router = router;\r\n  }\r\n   ```\r\n  This is all you need to make a separate, lazily loaded bundle which contains a given route and all of its dependencies. No other configuration needed.\r\n- simple glob patterns (single `*` and double `**`) are now supported for adding/matching dependencies in build resources and importing from code\r\n  (e.g. `/* @import('./path/*\\/.js') */`)\r\n- related `.html` and `.css` files of the same name as the ViewModel are now included as its dependencies by convention, you may configure additional extensions or other conventions by passing a method in the Webpack configuration file\r\n- hot reload for CSS imported in JS files works\r\n\r\nI'm marking this \"experimental\", since everything about this is a \"breaking change\" and it needs further testing by other people to iron out possible bugs. I've tried best I can to test this thoroughly, but it's still pretty fresh. Also, there are no docs written yet, especially for the [webpack-dependency-suite](https://github.com/niieani/webpack-dependency-suite), a collection of plugins and loaders which I've written with Aurelia in mind (but they're generic, hence deprecation of _aurelia-webpack-plugin_).\r\nAll this work was also prep for two more features that will now be possible:\r\n- integrated server side rendering\r\n- hot-reload for View templates, and later, ViewModels\r\n\r\nComments are welcome.\r\n\r\nThis skeleton won't work until the dependent PR's are merged and published to NPM as new versions. \r\n\r\n@EisenbergEffect This PR is blocked by:\r\n\r\n- [x] Creating a repo under @aurelia, moving and publishing: [aurelia-loader-nodejs](https://github.com/niieani/aurelia-loader-nodejs)\r\n- [ ] Merging and publishing: https://github.com/aurelia/bootstrapper/pull/50\r\n- [ ] Merging and publishing: https://github.com/aurelia/loader-webpack/pull/25\r\n- [ ] Merging and publishing: https://github.com/aurelia/templating/pull/491\r\n- [x] Publishing: https://github.com/aurelia/pal-nodejs (already merged https://github.com/aurelia/pal-nodejs/pull/16)\r\n- [x] Publishing: https://github.com/aurelia/protractor-plugin (small fix)\r\n"},"comment":{"url":"https://api.github.com/repos/aurelia/skeleton-navigation/issues/comments/261713390","html_url":"https://github.com/aurelia/skeleton-navigation/pull/714#issuecomment-261713390","issue_url":"https://api.github.com/repos/aurelia/skeleton-navigation/issues/714","id":261713390,"user":{"login":"niieani","id":563469,"avatar_url":"https://avatars.githubusercontent.com/u/563469?v=3","gravatar_id":"","url":"https://api.github.com/users/niieani","html_url":"https://github.com/niieani","followers_url":"https://api.github.com/users/niieani/followers","following_url":"https://api.github.com/users/niieani/following{/other_user}","gists_url":"https://api.github.com/users/niieani/gists{/gist_id}","starred_url":"https://api.github.com/users/niieani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niieani/subscriptions","organizations_url":"https://api.github.com/users/niieani/orgs","repos_url":"https://api.github.com/users/niieani/repos","events_url":"https://api.github.com/users/niieani/events{/privacy}","received_events_url":"https://api.github.com/users/niieani/received_events","type":"User","site_admin":false},"created_at":"2016-11-19T13:18:20Z","updated_at":"2016-11-19T13:18:20Z","body":"Looks like you have loader-webpack twice, once the 2.0.0 version, once from the bootstrapper-webpack, which again, wasn't yet released (actually we're switching to a universal `boostrapper`).\r\n\r\nI think it will be easiest if you simply wait a few more days for the related packages to be released and then try the skeleton again."}}
{"actor":{"display_login":"niieani"}}