如何使用react-tools将jsx编译成JavaScript
时间:2015-04-02 23:51:06
收藏:0
阅读:16648
1,通过npm安装react-tools
npm –g react-tools
2,通过cmd进入项目根目录执行watch命令 jsx --watch src/ build/
src路径下存放的是jsx文件,编译后的js存放到build路径下
编译前:
编译后:
3,当目标文件变化以后,自动构建生成新的js文件。
原文:http://www.cnblogs.com/DJeanWeb/p/4388598.html
评论(0)