{"action":"closed","issue":{"url":"https://api.github.com/repos/yeoman/generator-angular/issues/1265","repository_url":"https://api.github.com/repos/yeoman/generator-angular","labels_url":"https://api.github.com/repos/yeoman/generator-angular/issues/1265/labels{/name}","comments_url":"https://api.github.com/repos/yeoman/generator-angular/issues/1265/comments","events_url":"https://api.github.com/repos/yeoman/generator-angular/issues/1265/events","html_url":"https://github.com/yeoman/generator-angular/issues/1265","id":132095874,"number":1265,"title":"how to [grunt build] with ES6","user":{"login":"axetroy","id":9758711,"avatar_url":"https://avatars.githubusercontent.com/u/9758711?v=3","gravatar_id":"","url":"https://api.github.com/users/axetroy","html_url":"https://github.com/axetroy","followers_url":"https://api.github.com/users/axetroy/followers","following_url":"https://api.github.com/users/axetroy/following{/other_user}","gists_url":"https://api.github.com/users/axetroy/gists{/gist_id}","starred_url":"https://api.github.com/users/axetroy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axetroy/subscriptions","organizations_url":"https://api.github.com/users/axetroy/orgs","repos_url":"https://api.github.com/users/axetroy/repos","events_url":"https://api.github.com/users/axetroy/events{/privacy}","received_events_url":"https://api.github.com/users/axetroy/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-08T09:54:13Z","updated_at":"2016-02-08T20:33:14Z","closed_at":"2016-02-08T20:33:14Z","body":"i want to use ES6 to build my APP.\r\nbut this generator don't support to build with ES6.\r\n\r\nwhe i add some ES6 code in my js file\r\n```js\r\n  .run(function ($timeout) {\r\n    $timeout(()=>{\r\n      alert(123);\r\n    });\r\n  });\r\n```\r\nand the run `grunt serve`\r\nyeah!\r\nit will be runed like expected,everything is ok.\r\n\r\nbut when i want to public my app,and build it with `grunt build`\r\nit won't transform ES6 to ES5,so bring about some error like this:\r\n```bash\r\nRunning \"uglify:generated\" (uglify) task\r\nJS_Parse_Error {\r\n  message: 'Unexpected token: punc ())',\r\n  filename: '../../.tmp/concat/scripts/scripts.js',\r\n  line: 37,\r\n  col: 14,\r\n  pos: 739,\r\n  stack: 'Error\\n    at new JS_Parse_Error (/home/axetroy/developer/angular/angular-test/node_modules/uglify-js/lib/parse.js:196:18)\\n    at js_error (/home/axetroy/developer/angular/angular-test/node_modules/uglify-js/lib/parse.js:204:11)\\n    at croak (/home/axetroy/developer/angular/angular-test/node_modules/uglify-js/lib/parse.js:680:9)\\n    at token_error (/home/axetroy/developer/angular/angular-test/node_modules/uglify-js/lib/parse.js:688:9)\\n    at unexpected (/home/axetroy/developer/angular/angular-test/node_modules/uglify-js/lib/parse.js:694:9)\\n    at expr_atom (/home/axetroy/developer/angular/angular-test/node_modules/uglify-js/lib/parse.js:1189:13)\\n    at maybe_unary (/home/axetroy/developer/angular/angular-test/node_modules/uglify-js/lib/parse.js:1363:19)\\n    at expr_ops (/home/axetroy/developer/angular/angular-test/node_modules/uglify-js/lib/parse.js:1398:24)\\n    at maybe_conditional (/home/axetroy/developer/angular/angular-test/node_modules/uglify-js/lib/parse.js:1403:20)\\n    at maybe_assign (/home/axetroy/developer/angular/angular-test/node_modules/uglify-js/lib/parse.js:1427:20)' }\r\n>> Uglifying source .tmp/concat/scripts/scripts.js failed.\r\nWarning: Uglification failed.\r\nUnexpected token: punc ()). \r\nLine 37 in .tmp/concat/scripts/scripts.js\r\n Use --force to continue.\r\n\r\nAborted due to warnings.\r\n```\r\n\r\nso ,how to fixed this?\r\nty"}}