aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.functions12
1 files changed, 12 insertions, 0 deletions
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`/`<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
+}