ember-cli-emberscript0.0.18 • Public • Published
EmberScript support for ember-cli
Adds precompilation of EmberScript files and all the basic generation
types to the
ember generate command.
- Generating files in EmberScript with
- Preprocessing EmberScript-files in your app
npm install ember-cli-emberscript --save-dev
Should work with ember-cli version
0.0.44 and up (if not let me know).
How to use
ember help generate to get a list of available blueprints.
Use them by running
ember g <blueprint> <args>, for instance
ember g controller pants type:array
Currently, the multi-compile version of EmberScript is used to allow for multi script languages to co-exide and be compiled separately for a single file. This is to overcome when EmberScript adds certain variables to the top (see issue #44
Script file layout
The basic layout of a file is like this. In thee blueprints,
(ember) is used as the emberscript indicator, but you might as well use simply
See more info @ emberscript multicompile.
By convention, the first fragment will then be treated as normal coffeescript and be compiled separately before the emberscript (or whatever) coming after. This allows you to easily insert ES6 module statements where you want etc.
Please check out the README for more details and customisation options.
Let me know what you would like to see...