summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2017-01-27 16:02:51 +0100
committerAlan Pearce2017-01-27 16:02:51 +0100
commit8c8d10f5f0529d0b650b0b2006855972a8fa2acc (patch)
tree5bacf3fdfa6fb9c9127cd0555f1e1c4e9d279600
parentc090565b332d5ec6a90ef1a35f953979edd09f32 (diff)
downloaddotfiles-8c8d10f5f0529d0b650b0b2006855972a8fa2acc.tar.lz
dotfiles-8c8d10f5f0529d0b650b0b2006855972a8fa2acc.tar.zst
dotfiles-8c8d10f5f0529d0b650b0b2006855972a8fa2acc.zip
Emacs: Add commands for yarn add {,--dev}
-rw-r--r--tag-emacs/emacs.d/init.org10
1 files changed, 10 insertions, 0 deletions
diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org
index cbe5d91..ba73958 100644
--- a/tag-emacs/emacs.d/init.org
+++ b/tag-emacs/emacs.d/init.org
@@ -439,6 +439,16 @@ based upon some folder conventions I use.
               (projectile-with-default-dir (projectile-project-root)
                 (cmd-to-echo "yarn" "install")))
 
+            (defun yarn-add-dev (package)
+              (interactive "spackage: ")
+              (projectile-with-default-dir (projectile-project-root)
+                (cmd-to-echo "yarn" (concat "add --dev " package))))
+
+            (defun yarn-add (package)
+              (interactive "spackage: ")
+              (projectile-with-default-dir (projectile-project-root)
+                (cmd-to-echo "yarn" (concat "add " package))))
+
             (defun ap/open-work-project (&optional arg)
               (interactive "P")
               (ap/open-subfolder-project work-project-directory arg))