From 590c8d7e92a0dd1d7265a8661c634c70e7f8505d Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 5 Oct 2017 14:32:51 +0200 Subject: Emacs: Add npx-run command for node projects --- emacs/.emacs.d/main.el | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'emacs') 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 -- cgit 1.4.1