这是我用于css构建的设置
"scripts": { "css": "node-sass src/style.scss -o dist", "css:watch": "npm run css && node-sass src/style.scss -wo dist"},"devDependencies": { "node-sass": "^3.4.2"}-o标志设置目录以输出css。我有一个非监视版本“ css”,因为监视版本“ css:watch”〜不会在运行后立即构建〜,它只能在更改时运行,所以我称之为
npm run css
打电话之前
node-sass src/style.scss -wo dist
如果只希望它在更改时运行,而不是在首次运行时运行,请使用
"css:watch": "node-sass src/style.scss -wo dist"



