1、安装node
从这里下载Node
选择适合自己的版本,下载后安装。
2、通过npm安装react-tools
First install theBabelcommand-line tools (requiresnpm):
npminstall--globalbabel
Then,translate yoursrc/helloworld.js
file to plain JavaScript:
babelsrc--watch--out-dirbuild
3、截图
编译前:
@H_502_28@ @H_502_28@编译后: @H_502_28@