Skip to content

Instantly share code, notes, and snippets.

@jsoizo
Created June 1, 2018 09:51
Show Gist options
  • Save jsoizo/0b3a75cea729af5cb4fef83e1c400220 to your computer and use it in GitHub Desktop.
Save jsoizo/0b3a75cea729af5cb4fef83e1c400220 to your computer and use it in GitHub Desktop.
scripts
#!/bin/sh
if [ -f ./package.json ]; then
npm run $(cat ./package.json | jq -r '.scripts | keys[]' | peco)
else
echo "package.json not found" >&2
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment