Skip to content

Instantly share code, notes, and snippets.

@neatshell
Created May 23, 2019 12:55
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 neatshell/a55f3f766f3643317fc66388806063e3 to your computer and use it in GitHub Desktop.
Save neatshell/a55f3f766f3643317fc66388806063e3 to your computer and use it in GitHub Desktop.
# Retrieve the arguments passed to an npm/yarn script
ARGV=$(echo "console.log(JSON.parse(process.argv[2]).original.splice(1, Infinity).join(' '))" | node - ${npm_config_argv})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment