问题
I installed SASS build system for Sublime Text 2 just as described in the readme and everything succeeded (also SASS installation). Now, if I try to build my .scss file ST2 prints out something like "[Finished in 0.2s]" without showing me any result or save a .css file. I also can write some wrong code and it will not complain about it, just give me a "finished" message again. Any idea what's causing this behaviour?
回答1:
I had the same problem on my Mountain Lion.
I fixed it by changing the "cmd" line in the SASS.sublime-build (and all the others build files I have for SASS) from
["sass", "--update", "$file:${file_path}/${file_base_name}.css"]
to
["sass --update $file:${file_path}/${file_base_name}.css"]
Don't know why, but practically if you write the command in an array with more than one item, it won't work, while the command all in one string does work.
回答2:
gem install sass
in ST2 /tools/build system/new build system...
{
"cmd": ["cmd", "/c", "sass --style compressed", "$file", "$file_base_name.css.min"]
}
or
{
"cmd": ["cmd", "/c", "sass", "$file", "$file_base_name.css"]
}
save as "sass.sublime-build"
来源:https://stackoverflow.com/questions/12448546/sublime-text-2-doesnt-save-built-sass-file