diff options
author | Alan Pearce | 2017-10-05 14:32:51 +0200 |
---|---|---|
committer | Alan Pearce | 2017-10-05 14:32:51 +0200 |
commit | 590c8d7e92a0dd1d7265a8661c634c70e7f8505d (patch) | |
tree | ae4e2ed45c6acb84ceb089e75435cc80162d0cce | |
parent | db81c0b127dd23c71ca498aad40764bd0cb63be3 (diff) | |
download | dotfiles-590c8d7e92a0dd1d7265a8661c634c70e7f8505d.tar.lz dotfiles-590c8d7e92a0dd1d7265a8661c634c70e7f8505d.tar.zst dotfiles-590c8d7e92a0dd1d7265a8661c634c70e7f8505d.zip |
Emacs: Add npx-run command for node projects
-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 f837c83..4fa1b1a 100644 --- a/emacs/.emacs.d/main.el +++ b/emacs/.emacs.d/main.el @@ -528,6 +528,11 @@ (cmd-to-echo "yarn" (concat "run " cmd))) (t (cmd-to-echo "npm" (concat "run " cmd)))))) + (defun npx-run (cmd) + (interactive "scommand: ") + (projectile-with-default-dir (projectile-project-root) + (cmd-to-echo "npx" cmd))) + (defun ap/open-project (&optional arg) (interactive "P") (let ((project-dir (projectile-completing-read |