Write javascript ES6 (http://git.io/es6features) in your Meteor app. A port of the Babel transpiler (previously known as 6to5).
It also include the runtime
and core-js
(without ES6 Number) in lib/
to support features like function generators, sets,..
Your regular .js
files will take ES2015 syntax by default if you do meteor add ecmascript
meteor add grigio:babel
You can override the default config, just create a babel.json
file in your project and override the default behavior. Then restart meteor
to apply.
{
"debug": false, // print loaded config
"verbose": true, // print active file extensions
"extensions": ["es6.js", "es6", "jsx"], // babel managed extensions
"stage": 0 // experimental ES7 support
}
NOTE: If you use reactjs:react
you must create babel.json
and remove jsx
from your extensions
, to avoid JSX
compilation conflict.
{
...
"extensions": ["es6.js", "es6"], // .jsx is compiled via react-tools in this case
...
}
Some ES6 ES7 features aren't available
Inside this package:
meteor test-packages ./ # or spacejam test-packages ./
Luigi Maselli - http://grigio.org & contributors - MIT Licence