Sublime Text 2 doesn't save built SASS file

ε祈祈猫儿з 提交于 2019-12-31 03:20:10

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!