/mockjs

mock everything you want

Primary LanguageShell

babel 将ES6 转化为 ES5 的命令: http://www.ruanyifeng.com/blog/2016/01/babel.html

转码结果输出到标准输出

$ babel example.js

转码结果写入一个文件

--out-file 或 -o 参数指定输出文件

$ babel example.js --out-file compiled.js

或者

$ babel example.js -o compiled.js

整个目录转码

--out-dir 或 -d 参数指定输出目录

$ babel src --out-dir lib

或者

$ babel src -d lib

-s 参数生成source map文件

$ babel src -d lib -s

代码转换,然后运行

$ npm run startlib

.eslintrc.json 配置级别

0 - turn the rule off
1 - turn the rule on as a warning (doesn't affect exit code)
2 - turn the rule on as an error (exit code will be 1)