From 8c8d10f5f0529d0b650b0b2006855972a8fa2acc Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Fri, 27 Jan 2017 16:02:51 +0100 Subject: Emacs: Add commands for yarn add {,--dev} --- tag-emacs/emacs.d/init.org | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tag-emacs') 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)) -- cgit 1.4.1