sass scss with sublime
阿新 • • 發佈:2018-06-23
ase osx window windows CM filter CA setting text
1.打開sublime,安裝包 Sass, Sass Build, SublimeOnSaveBuild
2.若未安裝sass,打開iterm,gem(ruby工具)安裝sass
sudo gem install sass
3.配置編譯目錄
打開sublime
tools -> Build System -> New Build System,粘貼代碼 -> 保存(mysass.sublime-build)
tools -> Build System -> mysass
{ "cmd": ["sass", "--update", "$file:${file_path}/../css/${file_base_name}.css", "--stop-on-error", "--no-cache", "--style", "expanded", "--sourcemap=none"],"selector": "source.sass, source.scss", "line_regex": "Line ([0-9]+):", "osx": { "path": "/usr/local/bin:$PATH" }, "windows": { "shell": "true" } }
4.不編譯下劃線 _ 開頭的文件
Sublime text -> Preferences -> Package Setting -> SublimeOnSaveBuild -> Settings - User
{ "filename_filter": "(/|\\\\|^)(?!_)(\\w+)\\.(css|js|sass|less|scss)$" }
sass scss with sublime