CodeSky 代码之空

随手记录自己的学习过程

Node.js Jade/Stylus/Coffee 监测变化自动编译

2015-02-15 16:52分类: JavaScript评论: 4

这两天发现以前手动编译的自己是多么的逗比了……

其实很简单嘛,在Jade/Stylus/Coffee中人工编译:

jade index.jade
stylus style.styl
coffee -c core.coffee

而自动编译只要加个watch就可以了ㄟ( ▔, ▔ )ㄏ

jade -w index.jade
stylus -w style.styl
coffee -wc core.coffee

另外,CMD中可以通过ctrl+c结束运行中的命令。

评论 (1)

raidou2015年2月19日 08:54

呃 (o゚▽゚)||| 不考虑用 `grunt` or `gulp` 构建项目嘛。。 除了可以自动编译这类脚本 还可以用 [csso](https://github.com/css/csso) , [uglify](https://github.com/terinjokes/gulp-uglify) 之类来优化代码呀

敖天羽2015年2月19日 21:20

grunt ┑( ̄Д  ̄)┍可是我不会写Node.js的配置文件