Last active
April 5, 2019 16:18
-
-
Save mchelen/96306293a3eb6e2ed815333edc35a82a to your computer and use it in GitHub Desktop.
passing cli options to npm scripts
This file contains hidden or 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
#!/bin/sh | |
# if i pass CLI options to index.js like this: | |
npm run test -- optA | |
# currently results in: | |
echo | bunyan "optA" | |
# instead i want: | |
echo "optA" | bunyan |
This file contains hidden or 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
{ | |
"scripts": { | |
"test": "echo | bunyan" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment