summary refs log tree commit diff stats
path: root/tag-emacs
diff options
context:
space:
mode:
authorAlan Pearce2017-01-27 16:02:51 +0100
committerAlan Pearce2017-01-27 16:02:51 +0100
commit8c8d10f5f0529d0b650b0b2006855972a8fa2acc (patch)
tree5bacf3fdfa6fb9c9127cd0555f1e1c4e9d279600 /tag-emacs
parentc090565b332d5ec6a90ef1a35f953979edd09f32 (diff)
downloadnixfiles-8c8d10f5f0529d0b650b0b2006855972a8fa2acc.tar.lz
nixfiles-8c8d10f5f0529d0b650b0b2006855972a8fa2acc.tar.zst
nixfiles-8c8d10f5f0529d0b650b0b2006855972a8fa2acc.zip
Emacs: Add commands for yarn add {,--dev}
Diffstat (limited to 'tag-emacs')
-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 cbe5d911..ba739581 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))