目前sass提供了观察文件变化,自动将sass文件编译成css的功能。如:You can also tell Sass to watch the file and update the CSS every time the Sass file changes:sass --watch input.scss:output.cssIf you have a directory with many Sass files, you can also tell Sass to watch the entire directory:sass --watch app/sass:public/stylesheets在有些机子上跟踪编译非常慢。使用不便。如果想更顺手的完成更复杂的编译,就需要使用nodejs,gulp 工具进行处理。
[TOC]
用到的Gulp插件
gulp-sass
gulp-clean-css
gulp-htmlmin
Sass安装环境ubuntu 16.04
sudo apt-get install ruby
sudo gem install sass
Continue reading...