Skip to content

Instantly share code, notes, and snippets.

@dashed
Forked from sindresorhus/np.sh
Created January 15, 2014 21:14
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 dashed/8444826 to your computer and use it in GitHub Desktop.
Save dashed/8444826 to your computer and use it in GitHub Desktop.
# npm publish with goodies
# `np` with an optional argument `patch`/`minor`/`major`/`<version>`
# defaults to `patch`
np() {
trash node_modules &>/dev/null;
git pull --rebase && \
npm install && \
npm test && \
npm version ${1:=patch} && \
npm publish && \
git push --follow-tags
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment