Last active
April 22, 2017 09:59
-
-
Save stelcheck/d8fb8c617eebc3df8351dff2e8aeedd8 to your computer and use it in GitHub Desktop.
Extracting NPM command arguments from within an NPM script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var npmArgs = JSON.parse(process.env.npm_config_argv); | |
if (npmArgs.original.indexOf('--bootstrap') === -1) { | |
process.exit(0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment