How can I get node-sass watch and live reload to work from a single NPM script?

后端 未结 6 1475
面向向阳花
面向向阳花 2021-01-02 23:30

Taking the following scripts section from a package.json:

\"scripts\":{
    \"sass:watch\": \"npm run sass -- -w ./src/public/stylesheets -r --s         


        
6条回答
  •  萌比男神i
    2021-01-03 00:08

    Use parallelshell.

    Here's how I'm doing it.

    With live-server it'll look like:

    "serve": "live-server",
    "start": "parallelshell \"npm run scss && npm run scss -- -w\" \"npm run serve\""
    

提交回复
热议问题