all repos — archive/dotfiles @ 590c8d7e92a0dd1d7265a8661c634c70e7f8505d

Superseded by nixfiles

Emacs: Add npx-run command for node projects

Alan Pearce
commit

590c8d7e92a0dd1d7265a8661c634c70e7f8505d

parent

db81c0b127dd23c71ca498aad40764bd0cb63be3

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

jump to
M emacs/.emacs.d/main.elemacs/.emacs.d/main.el
@@ -528,6 +528,11 @@ ((string-equal (projectile-project-type) "node-yarn")
(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