Babel

运行ES6代码:

1.  $ babel-node   然后输入es6代码

2. $ babel-node es6.js  

编译转换ES代码:

1. $ babel es6.js

2. $ babel es6.js -o es5.js

3.转换整个目录 $ babel -d build-dir  source-dir  

其他参数:

-s 生成source map文件

你可能感兴趣的:(Babel)