我可以运行一次编译器,它将.scss页面呈现为.css,但是我无法使用-w或--watch模式来使node-sass编译器成功呈现,以观察更改。我没有收到任何错误,它只输出一个>
Package.json
{
"name": "mcmanus",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"compile:sass": "node-sass mysite/static/sass/_main.scss mysite/static/css/tutorial.css --watch"
},
"author": "",
"license": "ISC",
"dependencies": {},
"devDependencies": {
"node-sass": "^4.9.3"
}
}
我跑步时
npm运行compile:sass
这是我的终端上的输出,它只坐在那儿,没有返回“ Rendered tutorial.css ...”确认。
端子输出
dominic@dom-Inspiron-7559:~/Desktop/Projects/mcmanus/mcmanus/mysite$ npm run compile:sass
> mcmanus@1.0.0 compile:sass /home/dominic/Desktop/Projects/mcmanus/mcmanus/mysite
> node-sass mysite/static/sass/_main.scss mysite/static/css/tutorial.css --watch