Babel

2017-03-04  本文已影响0人  ANoman_M

运行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文件

上一篇 下一篇

猜你喜欢

热点阅读