all repos — nixfiles @ 7c4e5b86ca9b1712882991d7e3f777db99f01356

System and user configuration, managed by nix and home-manager

Emacs: Add yarn-remove command
Alan Pearce alan@alanpearce.eu
Wed, 06 Sep 2017 14:44:38 +0200
commit

7c4e5b86ca9b1712882991d7e3f777db99f01356

parent

f21ac9298f04a588610270c6207a31709cbc96f2

1 files changed, 5 insertions(+), 0 deletions(-)

jump to
M emacs/.emacs.d/main.elemacs/.emacs.d/main.el
@@ -593,6 +593,11 @@ (interactive "spackage: ")               (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)))))))