How to set shell for npm run-scripts in Windows

后端 未结 7 2076
执笔经年
执笔经年 2020-11-28 02:46

I\'m running npm on Windows and would like to use & style parallel operations in run-scripts but running in parallel in cmd is kind of messy in my package.json file I\'

7条回答
  •  北荒
    北荒 (楼主)
    2020-11-28 03:04

    You can also use cross-platform powershell https://github.com/powershell/powershell#get-powershell for npm scripts.

    To set for single project, run this from project root folder:

    npm config set script-shell pwsh --userconfig ./.npmrc
    

    To globally set for all node projects:

    npm config set script-shell pwsh [--global]
    

提交回复
热议问题