diff options
author | Alan Pearce | 2017-10-18 12:35:11 +0200 |
---|---|---|
committer | Alan Pearce | 2017-10-18 12:35:11 +0200 |
commit | ee14f070df766bddd8710124dbcfc2737422882d (patch) | |
tree | de778ecabb02bf25bab950f6992df5c235701dfc /emacs | |
parent | d92c9ac5802040585d0d1bd742bd59a78c2a3922 (diff) | |
download | nixfiles-ee14f070df766bddd8710124dbcfc2737422882d.tar.lz nixfiles-ee14f070df766bddd8710124dbcfc2737422882d.tar.zst nixfiles-ee14f070df766bddd8710124dbcfc2737422882d.zip |
Emacs: Add npm-yarn aliases
Diffstat (limited to 'emacs')
-rw-r--r-- | emacs/.emacs.d/main.el | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/emacs/.emacs.d/main.el b/emacs/.emacs.d/main.el index d138d976..80ff2d5a 100644 --- a/emacs/.emacs.d/main.el +++ b/emacs/.emacs.d/main.el @@ -494,6 +494,7 @@ ((string-equal (projectile-project-type) "node-yarn") (cmd-to-echo "yarn" "install")) (t (cmd-to-echo "npm" "install"))))) + (defalias 'npm-install #'yarn-install) (defun yarn-add-dev (package) (interactive "spackage: ") @@ -502,6 +503,7 @@ ((string-equal (projectile-project-type) "node-yarn") (cmd-to-echo "yarn" (concat "add --dev " package))) (t (cmd-to-echo "npm" (concat "install --save-dev " package)))))) + (defalias 'npm-save-dev #'yarn-add-dev) (defun yarn-add (package) (interactive "spackage: ") @@ -510,6 +512,7 @@ ((string-equal (projectile-project-type) "node-yarn") (cmd-to-echo "yarn" (concat "add " package))) (t (cmd-to-echo "npm" (concat "install --save " package)))))) + (defalias 'npm-save #'yarn-add) (defun yarn-remove (package) (interactive "spackage: ") @@ -518,6 +521,7 @@ ((string-equal (projectile-project-type) "node-yarn") (cmd-to-echo "yarn" (concat "remove " package))) (t (cmd-to-echo "npm" (concat "remove " package)))))) + (defalias 'npm-remote #'yarn-remove) (defun yarn-run (cmd) (interactive (list @@ -527,6 +531,7 @@ ((string-equal (projectile-project-type) "node-yarn") (cmd-to-echo "yarn" (concat "run " cmd))) (t (cmd-to-echo "npm" (concat "run " cmd)))))) + (defalias 'npm-run #'yarn-run) (defun npx-run (cmd) (interactive "scommand: ") |