The obsolete file .babelrc
is now replaced with a babel
section in package.json:
"babel": {
"presets": [
"es2015"
]
},
So to run babel-node i.js
from the command line, all that is required is:
npm install -g babel-cli
npm install
Later you can add more presets, like
npm install -S babel-preset-stage-0
and the babel section of package.json becomes:
"babel": { "presets": [ "es2015", "stage-0" ] },
Revision 2 updates for babel 6.x.x (babel options specified in package.json babel section rather than in .babelrc)