[ALOY-1312] Upgrade Alloy to ES6

GitHub Issuen/a
Resolution Date2017-05-24T16:52:42.000+0000
Affected Version/sn/a
Fix Version/sAlloy 1.10.0
ReporterRick Blalock
AssigneeChristopher Williams


This is a Jira to start the discussion on migrating Alloy to ES6. Two specific things come to mind that can happen: 1. If we don't have a JS runtime that supports ES6 yet, a pre-compiler Alloy plugin using Babel would work. 2. Alloy controllers re-written to be ES6 classes (big undertaking, I know)


  1. Jérémy Tonneau 2017-01-24 Any update on this ?
  2. Brenton House 2017-04-19 [~fmiao] Is the plan on this still to use babel to transform to es5 or to just use es6 code with newer JS runtimes?
  3. Christopher Williams 2017-04-20 So I think this ticket ought to be broken down, and I am actively investigating/working on a large piece of this. Specifically there is a difference between "supporting ES6" code, and rewriting Alloy to take advantage of ES6 (i.e. rewriting controllers to be ES6 classes). I think the first step, and one which is a fairly large undertaking, is to replace our reliance/usage of uglifyjs as the JS parser to handle user code and to walk and transform the AST, as well as to "compress" the code. This is very similar to TIMOB-24609, but seems to be more extensive in Alloy's case. I'd say that's a much more pressing issue, and re-architecting alloy itself to take advantage of ES6 would be nice but can be lower priority and done later perhaps.
  4. Christopher Williams 2017-04-20
  5. Brenton House 2017-04-20 Thanks [~cwilliams]!!
  6. Christopher Williams 2017-05-15 Note that this PR is about supporting user ES6 code, not rewriting alloy to generate ES6 controllers or anything. https://github.com/appcelerator/alloy/pull/825

JSON Source