{ "id": "169008", "key": "TIMOB-24980", "fields": { "issuetype": { "id": "4", "description": "An improvement or enhancement to an existing feature or task.", "name": "Improvement", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "20034", "name": "Alloy 2.0.0", "archived": false, "released": false } ], "resolution": null, "resolutiondate": null, "created": "2017-07-18T18:46:28.000+0000", "epic": { "id": 152521, "key": "TIMOB-19834", "name": "Support ES6 for Titanium Application Development", "summary": "Support ES6 for Titanium Application Development", "color": { "key": "color_1" }, "done": false }, "priority": { "name": "High", "id": "2" }, "labels": [ "alloy", "babel" ], "versions": [], "issuelinks": [], "assignee": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "updated": "2019-03-14T14:24:19.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10207", "name": "Tooling" } ], "description": "{noformat}\r\nAs a developer,\r\nI want to be able to add/configure babel plugins to run on my code,\r\nSo that I can add features without Alloy pull request.\r\n{noformat}\r\n\r\nThere are a lot of features that can be added to Alloy by allow babel presets and plugins to be defined in config.json. Currently, it is somewhat possible to add a preset by pushing them to {{sourceMapper.OPTIONS_OUTPUT.presets}} from inside alloy.jmk. However, when adding plugins, they are removed because Alloy is overwriting all plugins here: https://github.com/appcelerator/alloy/blob/master/Alloy/commands/compile/index.js#L1131-L1136\r\n\r\nIf instead it used {{_.defaults}} (or even better, a merge), it could preserve any changes to {{sourceMapper.OPTIONS_OUTPUT.plugins}} ", "attachment": [], "flagged": false, "summary": "Allow babel plugins to be added via config.json", "creator": { "name": "brentonhouse", "key": "brentonhouse", "displayName": "Brenton House", "active": true, "timeZone": "America/Chicago" }, "subtasks": [], "reporter": { "name": "brentonhouse", "key": "brentonhouse", "displayName": "Brenton House", "active": true, "timeZone": "America/Chicago" }, "environment": null, "closedSprints": [ { "id": 964, "state": "closed", "name": "2017 Sprint 22 Tooling", "startDate": "2017-10-22T21:42:00.037Z", "endDate": "2017-11-05T22:42:00.000Z", "completeDate": "2017-11-06T16:36:21.766Z", "originBoardId": 219 }, { "id": 996, "state": "closed", "name": "2018 Sprint 03 Tooling", "startDate": "2018-01-28T16:24:33.898Z", "endDate": "2018-02-11T16:24:00.000Z", "completeDate": "2018-02-12T04:23:35.987Z", "originBoardId": 219 }, { "id": 1028, "state": "closed", "name": "2018 Sprint 09 SDK", "startDate": "2018-04-22T22:53:08.928Z", "endDate": "2018-05-06T22:53:00.000Z", "completeDate": "2018-05-07T00:02:15.883Z", "originBoardId": 114 }, { "id": 969, "state": "closed", "name": "2017 Sprint 23 Tooling", "startDate": "2017-11-05T16:36:50.292Z", "endDate": "2017-11-19T16:36:00.000Z", "completeDate": "2017-11-20T18:58:45.002Z", "originBoardId": 219 }, { "id": 1001, "state": "closed", "name": "2018 Sprint 04 Tooling", "startDate": "2018-02-12T04:25:16.870Z", "endDate": "2018-02-26T04:25:00.000Z", "completeDate": "2018-02-26T19:38:13.619Z", "originBoardId": 219 }, { "id": 940, "state": "closed", "name": "2017 Sprint 17 Tooling", "startDate": "2017-08-13T23:08:06.803Z", "endDate": "2017-08-27T23:08:00.000Z", "completeDate": "2017-08-27T21:14:05.511Z", "originBoardId": 219 }, { "id": 976, "state": "closed", "name": "2017 Sprint 24 Tooling", "startDate": "2017-11-19T19:00:51.738Z", "endDate": "2017-12-03T19:00:00.000Z", "completeDate": "2017-12-04T23:20:34.438Z", "originBoardId": 219 }, { "id": 1008, "state": "closed", "name": "2018 Sprint 06 SDK", "startDate": "2018-03-11T22:18:04.396Z", "endDate": "2018-03-25T22:18:00.000Z", "completeDate": "2018-03-25T21:52:36.683Z", "originBoardId": 216 }, { "id": 945, "state": "closed", "name": "2017 Sprint 18 Tooling", "startDate": "2017-08-27T21:14:41.095Z", "endDate": "2017-09-10T21:14:00.000Z", "completeDate": "2017-09-10T21:23:47.718Z", "originBoardId": 219 }, { "id": 977, "state": "closed", "name": "2017 Sprint 25 Tooling", "startDate": "2017-12-03T23:21:41.825Z", "endDate": "2017-12-17T23:21:00.000Z", "completeDate": "2017-12-18T22:30:55.005Z", "originBoardId": 219 }, { "id": 949, "state": "closed", "name": "2017 Sprint 19 Tooling", "startDate": "2017-09-10T21:25:25.151Z", "endDate": "2017-09-24T21:25:00.000Z", "completeDate": "2017-09-25T17:50:29.468Z", "originBoardId": 219 }, { "id": 983, "state": "closed", "name": "2017 Sprint 26 Tooling", "startDate": "2017-12-17T22:33:16.616Z", "endDate": "2017-12-31T22:33:00.000Z", "completeDate": "2018-01-02T16:57:51.963Z", "originBoardId": 219 }, { "id": 952, "state": "closed", "name": "2017 Sprint 20 Tooling", "startDate": "2017-09-24T17:51:02.825Z", "endDate": "2017-10-08T17:51:00.000Z", "completeDate": "2017-10-09T20:35:22.602Z", "originBoardId": 219 }, { "id": 986, "state": "closed", "name": "2018 Sprint 01 Tooling", "startDate": "2017-12-31T16:58:25.103Z", "endDate": "2018-01-14T16:58:00.000Z", "completeDate": "2018-01-17T22:42:40.307Z", "originBoardId": 219 }, { "id": 1018, "state": "closed", "name": "2018 Sprint 07 SDK", "startDate": "2018-03-25T21:59:36.637Z", "endDate": "2018-04-08T21:59:00.000Z", "completeDate": "2018-04-08T17:55:14.467Z", "originBoardId": 114 }, { "id": 1021, "state": "closed", "name": "2018 Sprint 08 SDK", "startDate": "2018-04-08T17:57:36.122Z", "endDate": "2018-04-22T17:57:00.000Z", "completeDate": "2018-04-22T22:51:19.120Z", "originBoardId": 114 }, { "id": 991, "state": "closed", "name": "2018 Sprint 02 Tooling", "startDate": "2018-01-14T22:42:09.481Z", "endDate": "2018-01-28T22:42:00.000Z", "completeDate": "2018-01-29T16:24:16.051Z", "originBoardId": 219 }, { "id": 960, "state": "closed", "name": "2017 Sprint 21 Tooling", "startDate": "2017-10-08T20:39:50.451Z", "endDate": "2017-10-22T20:39:00.000Z", "completeDate": "2017-10-24T23:57:13.964Z", "originBoardId": 219 } ], "comment": { "comments": [ { "id": "424317", "author": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "body": "Thanks for the ticket. Our engineers will look into it. ", "updateAuthor": { "name": "sdarda", "key": "sdarda", "displayName": "Sharif AbuDarda", "active": false, "timeZone": "Asia/Dhaka" }, "created": "2017-07-18T20:14:19.000+0000", "updated": "2017-07-18T20:14:19.000+0000" }, { "id": "427033", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "This is a pretty good idea. I'd also like to be able to give users a way to control additional babel plugins/presets they may want to use in the normal Titanium build process. Right now we do parsing to analyze the JS for Api usage for tracking, and will use babili to minify if minification is turned on.\r\n\r\nI wonder if users could simply add a .babelrc to their project and we could consume/extend it to also use babili when minifying (and make sure the transpilation happens after we parse to look for Ti API usage for tracking).", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2017-08-22T14:15:01.000+0000", "updated": "2017-08-22T14:15:01.000+0000" }, { "id": "427036", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "There's a work in progress PR here: https://github.com/appcelerator/alloy/pull/842\r\n\r\nIt has broader implications since alloy is still using underscore and older backbone versions - and underscore doesn't have a deep merge method. Lodash, underscore's more popular fork, does though. And it may make more sense to move to loads, deprecate underscore, and update backbone to latest and have it use lodash under the covers.", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2017-08-22T15:13:47.000+0000", "updated": "2017-08-22T15:13:47.000+0000" }, { "id": "427037", "author": { "name": "brentonhouse", "key": "brentonhouse", "displayName": "Brenton House", "active": true, "timeZone": "America/Chicago" }, "body": "[~cwilliams] -- I replace underscore with lodash in most of my alloy projects and am aware of most of the gotchas if you want any help with that. Some of the biggest issues are a result of the fact that the alloy compiler and the alloy runtime share the same underscore.js file. If we could separate that for now, it would make upgrading alloy runtime to lodash much easier.\r\n\r\nUpdate -- looks like you have already done this in the PR. I will take a look at it. Thanks!!", "updateAuthor": { "name": "brentonhouse", "key": "brentonhouse", "displayName": "Brenton House", "active": true, "timeZone": "America/Chicago" }, "created": "2017-08-22T15:25:29.000+0000", "updated": "2017-08-22T15:29:08.000+0000" }, { "id": "427040", "author": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "body": "OK, so using Lodash in place of underscore is a bigger fish to fry and may be a breaking change (or require allowing users to configure whether they use underscore or loads and deprecating underscore).\r\n\r\nSo I opened a smaller PR just for this change: https://github.com/appcelerator/alloy/pull/843", "updateAuthor": { "name": "cwilliams", "key": "cwilliams", "displayName": "Christopher Williams", "active": true, "timeZone": "America/New_York" }, "created": "2017-08-22T16:06:05.000+0000", "updated": "2017-08-22T16:06:05.000+0000" }, { "id": "444665", "author": { "name": "bhouse", "key": "bhouse", "displayName": "Brenton House", "active": true, "timeZone": "America/Chicago" }, "body": "[~cwilliams] - Is this now something that is supported via the webpack/babel integration?", "updateAuthor": { "name": "bhouse", "key": "bhouse", "displayName": "Brenton House", "active": true, "timeZone": "America/Chicago" }, "created": "2018-12-17T22:32:35.000+0000", "updated": "2018-12-17T22:32:35.000+0000" } ], "maxResults": 9, "total": 9, "startAt": 0 } } }