Skip to content

Instantly share code, notes, and snippets.

@holyzfy
Last active October 9, 2019 13:05
Show Gist options
  • Save holyzfy/170929ad3928e8d6b8eecef0af0dab69 to your computer and use it in GitHub Desktop.
Save holyzfy/170929ad3928e8d6b8eecef0af0dab69 to your computer and use it in GitHub Desktop.
Sublime Text 3 配置SASS
{
"preferences": {
"css.propertyEnd": ";",
"sass.propertyEnd": ";"
}
}
{
"selector": "source.sass, source.scss",
"line_regex": "Line ([0-9]+):",
"shell": true,
"env": {
"BROWSERSLIST": "> 1%, last 2 versions, Firefox ESR, ie >= 9"
},
"osx": {
"cmd": ["sass --style=expanded --update $file:${file_path}/${file_base_name}.css && postcss ${file_path}/${file_base_name}.css --map --use autoprefixer --replace"],
"path": "/Users/zhaofuyun/.nvm/versions/node/v10.10.0/bin:$PATH"
},
"windows": {
"cmd": ["sass", "--style", "expanded", "--update", "$file:${file_path}/${file_base_name}.css", "&&", "postcss", "${file_path}/${file_base_name}.css", "--map", "--use", "autoprefixer", "--replace"]
}
}
@holyzfy
Copy link
Author

holyzfy commented Nov 24, 2016

scss.sublime-build

如果是通过nvm安装的nodejs,请在path字段里增加node的path,示例:

"osx": {
    "path": "/usr/local/bin:/Users/zhaofuyun/.nvm/versions/node/v6.9.1/bin:$PATH"
}

运行which node能取得路径

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment