diff options
author | Sindre Sorhus <sindresorhus@gmail.com> | 2013-10-22 17:22:37 +0200 |
---|---|---|
committer | Mathias Bynens <mathias@qiwi.be> | 2013-10-22 18:11:42 +0200 |
commit | 565955198f6c627197cdd24cb26cb72cc0b2673a (patch) | |
tree | 22acbdbccead65b1b99584e76d8f14be3f2e6c4c | |
parent | 6c98b40f4d9b692863e4e58cfcb355058d5b8544 (diff) | |
download | dotfiles-565955198f6c627197cdd24cb26cb72cc0b2673a.tar.gz dotfiles-565955198f6c627197cdd24cb26cb72cc0b2673a.tar.bz2 dotfiles-565955198f6c627197cdd24cb26cb72cc0b2673a.zip |
Add `np` function to ease publishing node modules
I use this to ease the publishing of npm modules. `np`, done ;)
np = npm publish (and, `no problem`, (and `nutella party`))
Closes #261.
-rw-r--r-- | .functions | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -291,3 +291,15 @@ function o() { open "$@" fi } + +# `np` with an optional argument `patch`/`minor`/`major`/`<version>` +# defaults to `patch` +function np() { + git pull --rebase && \ + npm install && \ + npm test && \ + npm version ${1:=patch} && \ + npm publish && \ + git push origin master && \ + git push origin master --tags +} |