- 先进入node_modules/目录。
- cd /usr/lib/nodejs/node-v8.9.3/lib/node_modules/
- sudo -i
- npm i node-sass --save
- node-sass
Provide a Sass file to render
Example: Compile foobar.scss to foobar.css
node-sass --output-style compressed foobar.scss > foobar.css
cat foobar.scss | node-sass --output-style compressed > foobar.css
Example: Watch the sass directory for changes, compile with sourcemaps to the css directory
node-sass --watch --recursive --output css
--source-map true --source-map-contents sass
- 完成