Skip to content

Instantly share code, notes, and snippets.

@mchelen
Last active April 5, 2019 16:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mchelen/96306293a3eb6e2ed815333edc35a82a to your computer and use it in GitHub Desktop.
Save mchelen/96306293a3eb6e2ed815333edc35a82a to your computer and use it in GitHub Desktop.
passing cli options to npm scripts
#!/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
{
"scripts": {
"test": "echo | bunyan"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment