1、初始化项目
compass create test(项目名称),会在当前目录下创建test子目录,test的子目录下有config.gb文件,sass和stylesheets文件夹。
2、编写sass代码
3、编译sass
编译的几种命令:
compass compile:将sass子目录中的scss文件,编译成css文件,保存在stylesheets子目录中。
compass compile --output-style compressed:压缩文件并删除注释
compass compile --force:只编译发生变动的文件
compass watch:自动编译
在config.gb下配置编译命令:output_style = :expanded/:nested/:compact()/:compressed