summary refs log tree commit diff stats
path: root/emacs
diff options
context:
space:
mode:
authorAlan Pearce2017-09-06 14:44:38 +0200
committerAlan Pearce2017-09-06 14:44:38 +0200
commit7c4e5b86ca9b1712882991d7e3f777db99f01356 (patch)
tree2e71bc3962e1e0f84dd88f030b24bcb88367a038 /emacs
parentf21ac9298f04a588610270c6207a31709cbc96f2 (diff)
downloadnixfiles-7c4e5b86ca9b1712882991d7e3f777db99f01356.tar.lz
nixfiles-7c4e5b86ca9b1712882991d7e3f777db99f01356.tar.zst
nixfiles-7c4e5b86ca9b1712882991d7e3f777db99f01356.zip
Emacs: Add yarn-remove command
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.emacs.d/main.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/emacs/.emacs.d/main.el b/emacs/.emacs.d/main.el
index 8dd3afd6..bb902583 100644
--- a/emacs/.emacs.d/main.el
+++ b/emacs/.emacs.d/main.el
@@ -593,6 +593,11 @@
               (projectile-with-default-dir (projectile-project-root)
                 (cmd-to-echo "yarn" (concat "add " package))))
 
+            (defun yarn-remove (package)
+              (interactive "spackage: ")
+              (projectile-with-default-dir (projectile-project-root)
+                (cmd-to-echo "yarn" (concat "remove " package))))
+
             (defun yarn-run (cmd)
               (interactive (list
                             (projectile-completing-read "command: " (alist-get 'scripts (json-read-file (expand-file-name "package.json" (projectile-project-root)))))))