如图所示,新建编译规则:
第二部,将如下复制,并代码保存,并命名为自己可识别的标题,只改前缀,后缀不用更改
Mysass.sublime-build
{ "cmd": [ "sass", "--update", "$file:${file_path}/../css/${file_base_name}.css", "--stop-on-error", "--no-cache","&&", "postcss", "--use", "autoprefixer", "${file_path}/../css/${file_base_name}.css", "-d", "${file_path}/../css", "--no-cache", "--style", "compressed", "--sourcemap=none"], "selector": "source.sass, source.scss", "line_regex": "Line ([0-9]+):", "osx": { "path": "/usr/local/bin:$PATH" }, "windows": { "shell": "true" } }
第三部,新建编辑一个.scss为后缀的文件,ctrl+B命令,世界变得美好。