So I'm running tasks in npm package scripts but I want to pass the watch option in npm start
.
This works:
"scripts": {
"scss": "node-sass src/style.scss dist/style.css -w"
}
This doesn't compile, watch, or throw any error:
"scripts": {
"scss": "node-sass src/style.scss dist/style.css",
"start": "parallelshell "npm run scss -- -w""
}
Doesn't work without parallelshell either or without shorthand.
I assume the problem is the run-script is passing the extra argument in quotes, so the command comes out like:
node-sass src/style.scss dist/style.css "-w"
I'd like this to work without adding any dependencies. What am I missing?
Btw, I'm in Windows 10 with command prompt/git bash.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…