npm install – g babel
babel – help
在项目里安装npm install babel-core -- save-dev
babel xx.js
babel xx.js -- out-file xxx.js
babel xx.js -- out-file xxx.js --source-maps
babel --watch xx.js -- out-file xxx.js --source-maps
babel src -- out-dir lib
babel src -- out-file xxx.js
xx.html
<script src="node-modules/babe-core/browser.js"></script>
<script src="node-modules/babe-core/browser-polyfill.js"></script>//修补浏览器功能
<script src="xx.js" type="text/babel"></script>
brower-sync start --server