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"