1.添加scss自動(dòng)編譯
在設(shè)置的File Watchers
中添加Scss,然后只需為Program
選擇scss.bat(sass同理)
image.png
2.解決目錄中文編譯報(bào)錯(cuò)問(wèn)題
目錄中有中文,在寫(xiě)scss時(shí) 控制臺(tái)會(huì)報(bào)如下錯(cuò)誤:
image.png
解決方式:
找到
C:\Ruby24-x64\lib\ruby\gems\2.4.0\gems\sass-3.5.1\lib\sass\importers\filesystem.rb
修改第87行
if name.index(@root + "/") == 0
為下圖代碼
84 # If a full uri is passed, this removes the root from it
85 # otherwise returns the name unchanged
86 def remove_root(name)
87 if name.encode("utf-8","gbk").index(@root + "/") == 0
88 name[(@root.length + 1)..-1]
89 else
90 name
91 end
92 end
參考知乎:https://www.zhihu.com/question/31111185
3.解決scss中文問(wèn)題
開(kāi)頭寫(xiě)上@charest"UTF-8"
image.png