summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2018-02-22 12:46:07 +0100
committerAlan Pearce2018-02-22 12:46:07 +0100
commit11d81ea917c58513ce67e80c91cd831e8f45e8c6 (patch)
treedcd2b5da7bd88ff496de7f0005d43255df83e177
parent5467302f079380900f2d55c80c9a9e92460137a2 (diff)
downloaddotfiles-11d81ea917c58513ce67e80c91cd831e8f45e8c6.tar.lz
dotfiles-11d81ea917c58513ce67e80c91cd831e8f45e8c6.tar.zst
dotfiles-11d81ea917c58513ce67e80c91cd831e8f45e8c6.zip
Add npm version bump command
-rw-r--r--emacs/.emacs.d/main.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/emacs/.emacs.d/main.el b/emacs/.emacs.d/main.el
index 02960ec..08e401d 100644
--- a/emacs/.emacs.d/main.el
+++ b/emacs/.emacs.d/main.el
@@ -535,6 +535,12 @@
               (projectile-with-default-dir (projectile-project-root)
                 (cmd-to-echo "npx" cmd)))
 
+            (defun npm-version (type)
+              (interactive (list
+                            (projectile-completing-read "version: " '("major" "minor" "patch" "premajor" "preminor" "prepatch" "prerelease" "from-git"))))
+              (projectile-with-default-dir (projectile-project-root)
+                (cmd-to-echo "npm" (concat "version " type))))
+
             (defun ap/open-project (&optional arg)
               (interactive "P")
               (let ((project-dir (projectile-completing-read