Skip to content

Instantly share code, notes, and snippets.

@wtfaremyinitials
Last active May 18, 2017 03:53
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 wtfaremyinitials/a44ffad99f8e1b3c6edae1fc4bf4d05a to your computer and use it in GitHub Desktop.
Save wtfaremyinitials/a44ffad99f8e1b3c6edae1fc4bf4d05a to your computer and use it in GitHub Desktop.
Alternative to `yarn run` that doesn't spin up a node process
#!/bin/bash
CMD=$(jq -r .scripts.$1 < package.json)
echo -e '\033[37m$ '$CMD'\033[39m'
PATH=$PATH:./node_modules/.bin eval "$CMD"
echo -e '\xe2\x9c\xa8 Done.'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment