/set-package-script

A replacement for the deprecated npm set-script command

Primary LanguageJavaScript

set-package-script

A replacement for the deprecated npm set-script command

Usage

npx set-package-script <script-name> [command]

Examples

Add a build script

npx set-package-script build "tsc -p tsconfig.json"

Delete a prepare script

npx set-package-script prepare

If you don't provide a command and there's an existing script defined it will be removed