nmccready / skip-npm-task

Skip postinstall on local npm installs.

Home Page:https://npmjs.com/skip-local-postinstall

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

skip-npm-task

Skips (successfully exits current process) when whatever task is called if the task is not local by default.

If you want it to skip the task if it is local then pass -s or --skip-local.

If the task is allowed and all commands following are executed serially in order.

// package.json
// how prepare should work
"scripts": {
 "prepare": "skip-npm-task -t prepare sort-package-json 'echo hi' 'echo do something else'",
}

Requires process.env.INIT_CWD variable available in all stable npm releases. Credits to Már Örlygsson for suggesting this implementaiton on Stackoverflow.

About

Skip postinstall on local npm installs.

https://npmjs.com/skip-local-postinstall

License:MIT License


Languages

Language:JavaScript 100.0%