0.1.0 • Published 2 years ago

@znemz/skip-npm-task v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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.

0.1.0

2 years ago

0.0.1

2 years ago