From 565955198f6c627197cdd24cb26cb72cc0b2673a Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Tue, 22 Oct 2013 17:22:37 +0200 Subject: 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. --- .functions | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.functions b/.functions index 4a1e407..79255f1 100644 --- a/.functions +++ b/.functions @@ -291,3 +291,15 @@ function o() { open "$@" fi } + +# `np` with an optional argument `patch`/`minor`/`major`/`` +# 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 +} -- cgit v1.2.3