{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular/issues/8550","repository_url":"https://api.github.com/repos/angular/angular","labels_url":"https://api.github.com/repos/angular/angular/issues/8550/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/8550/comments","events_url":"https://api.github.com/repos/angular/angular/issues/8550/events","html_url":"https://github.com/angular/angular/issues/8550","id":153837608,"number":8550,"title":"Use Closure Compiler with offline template compiler","user":{"login":"alexeagle","id":47395,"avatar_url":"https://avatars.githubusercontent.com/u/47395?v=3","gravatar_id":"","url":"https://api.github.com/users/alexeagle","html_url":"https://github.com/alexeagle","followers_url":"https://api.github.com/users/alexeagle/followers","following_url":"https://api.github.com/users/alexeagle/following{/other_user}","gists_url":"https://api.github.com/users/alexeagle/gists{/gist_id}","starred_url":"https://api.github.com/users/alexeagle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexeagle/subscriptions","organizations_url":"https://api.github.com/users/alexeagle/orgs","repos_url":"https://api.github.com/users/alexeagle/repos","events_url":"https://api.github.com/users/alexeagle/events{/privacy}","received_events_url":"https://api.github.com/users/alexeagle/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular/angular/labels/P2:%20required","name":"P2: required","color":"fad8c7"},{"url":"https://api.github.com/repos/angular/angular/labels/state:%20Needs%20Design","name":"state: Needs Design","color":"006b75"}],"state":"open","locked":false,"assignee":{"login":"alexeagle","id":47395,"avatar_url":"https://avatars.githubusercontent.com/u/47395?v=3","gravatar_id":"","url":"https://api.github.com/users/alexeagle","html_url":"https://github.com/alexeagle","followers_url":"https://api.github.com/users/alexeagle/followers","following_url":"https://api.github.com/users/alexeagle/following{/other_user}","gists_url":"https://api.github.com/users/alexeagle/gists{/gist_id}","starred_url":"https://api.github.com/users/alexeagle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexeagle/subscriptions","organizations_url":"https://api.github.com/users/alexeagle/orgs","repos_url":"https://api.github.com/users/alexeagle/repos","events_url":"https://api.github.com/users/alexeagle/events{/privacy}","received_events_url":"https://api.github.com/users/alexeagle/received_events","type":"User","site_admin":false},"assignees":[{"login":"alexeagle","id":47395,"avatar_url":"https://avatars.githubusercontent.com/u/47395?v=3","gravatar_id":"","url":"https://api.github.com/users/alexeagle","html_url":"https://github.com/alexeagle","followers_url":"https://api.github.com/users/alexeagle/followers","following_url":"https://api.github.com/users/alexeagle/following{/other_user}","gists_url":"https://api.github.com/users/alexeagle/gists{/gist_id}","starred_url":"https://api.github.com/users/alexeagle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexeagle/subscriptions","organizations_url":"https://api.github.com/users/alexeagle/orgs","repos_url":"https://api.github.com/users/alexeagle/repos","events_url":"https://api.github.com/users/alexeagle/events{/privacy}","received_events_url":"https://api.github.com/users/alexeagle/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/angular/angular/milestones/61","html_url":"https://github.com/angular/angular/milestones/2.1.0","labels_url":"https://api.github.com/repos/angular/angular/milestones/61/labels","id":1820475,"number":61,"title":"2.1.0","description":"","creator":{"login":"vicb","id":248818,"avatar_url":"https://avatars.githubusercontent.com/u/248818?v=3","gravatar_id":"","url":"https://api.github.com/users/vicb","html_url":"https://github.com/vicb","followers_url":"https://api.github.com/users/vicb/followers","following_url":"https://api.github.com/users/vicb/following{/other_user}","gists_url":"https://api.github.com/users/vicb/gists{/gist_id}","starred_url":"https://api.github.com/users/vicb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vicb/subscriptions","organizations_url":"https://api.github.com/users/vicb/orgs","repos_url":"https://api.github.com/users/vicb/repos","events_url":"https://api.github.com/users/vicb/events{/privacy}","received_events_url":"https://api.github.com/users/vicb/received_events","type":"User","site_admin":false},"open_issues":18,"closed_issues":2,"state":"open","created_at":"2016-06-10T16:19:43Z","updated_at":"2016-09-14T03:59:54Z","due_on":null,"closed_at":null},"comments":22,"created_at":"2016-05-09T18:20:54Z","updated_at":"2016-09-20T19:27:55Z","closed_at":null,"body":"Angular's new offline compiler was demo'ed at ng-conf day 2 keynote by @robwormald. It generates tree-shakable ES6 code. Four steps are then required:\r\n- run a tree-shaker to remove ES6 modules not reachable from the entry point, in our demo we showed rollup\r\n- run a bundler to reduce down the module imports into a declarations in a single file; we showed system.js\r\n- down-level to ES5 - we showed this with TypeScript\r\n- minify to shorten symbol names, we used uglify.\r\n\r\nThis produced a 49k JS file, but requires a lot of configuration.\r\n\r\nGoogle's Closure Compiler (https://developers.google.com/closure/compiler/) produces very small JS. It does all four steps required above, so the configuration should be a lot simpler. We also suspect we can get a smaller binary size for ng2-hello-world, around 36k.\r\n\r\nWiring this up requires:\r\n- [ ] add tsickle's closure annotation helper to `ngc`, in progress at https://github.com/alexeagle/angular/tree/closure_hack\r\n- [ ] ?? modify Angular's ES6 distribution to be closure-compiler compatible\r\n- [ ] ?? modify ES6 distro of our dependencies (rxjs, zone.js) to be closure-compiler compatible\r\n- [ ] figure out a minimal build (maybe a shell script) that successfully compiles the application together with the framework and its dependencies\r\n- [ ] document how we did it so others can repro\r\n\r\nI'll sync with @martine about how we want to do it."},"comment":{"url":"https://api.github.com/repos/angular/angular/issues/comments/248406957","html_url":"https://github.com/angular/angular/issues/8550#issuecomment-248406957","issue_url":"https://api.github.com/repos/angular/angular/issues/8550","id":248406957,"user":{"login":"thelgevold","id":349548,"avatar_url":"https://avatars.githubusercontent.com/u/349548?v=3","gravatar_id":"","url":"https://api.github.com/users/thelgevold","html_url":"https://github.com/thelgevold","followers_url":"https://api.github.com/users/thelgevold/followers","following_url":"https://api.github.com/users/thelgevold/following{/other_user}","gists_url":"https://api.github.com/users/thelgevold/gists{/gist_id}","starred_url":"https://api.github.com/users/thelgevold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thelgevold/subscriptions","organizations_url":"https://api.github.com/users/thelgevold/orgs","repos_url":"https://api.github.com/users/thelgevold/repos","events_url":"https://api.github.com/users/thelgevold/events{/privacy}","received_events_url":"https://api.github.com/users/thelgevold/received_events","type":"User","site_admin":false},"created_at":"2016-09-20T19:27:55Z","updated_at":"2016-09-20T19:27:55Z","body":"@qdouble Hm interesting.. Are you saying it might be related to the JavaScript produced by TS 2.0.2? \r\nBecause by the time my code enters into rollup/closure compiler land, the code is already in JS format."}}
{"actor":{"display_login":"thelgevold"}}