Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/karimaziev/npmjs

Transient menu with all npm commands.
https://github.com/karimaziev/npmjs

emacs emacs-lisp emacs-package npm npmjs-packages

Last synced: 4 days ago
JSON representation

Transient menu with all npm commands.

Awesome Lists containing this project

README

        

#+OPTIONS: ^:nil

* About
Command dispatcher for npm package manager. Supports different npm versions, as arguments are dynamically parsed from help output.

[[./demo.png][./demo.png]]

* Table of Contents :TOC_2_gh:QUOTE:noexport:
#+BEGIN_QUOTE
- [[#about][About]]
- [[#requirenments][Requirenments]]
- [[#programs][Programs]]
- [[#emacs-packages][Emacs Packages]]
- [[#installation][Installation]]
- [[#manual][Manual]]
- [[#usage][Usage]]
#+END_QUOTE

* Requirenments

** Programs

| Program | Version | Description |
|----------------+----------+----------------------|
| npm | >=6 | Node Package Manager |
| [[https://github.com/nvm-sh/nvm][nvm]] (optional) | >=0.39.3 | Node Version Manager |
| Emacs | >=28.1 | Editor |

** Emacs Packages
| Package | Version | Description |
|----------------+----------+----------------------------------------|
| [[https://github.com/magit/transient][transient]] | >=0.4.0 | Builtin library (from Emacs 28.1). |
| [[https://github.com/abo-abo/swiper][ivy]] (optional) | >=0.13.4 | For async completions for npm packages |

* Installation

** Manual

Download the source code and put it wherever you like, e.g. into =~/.emacs.d/npmjs/=

#+begin_src shell :eval no
git clone https://github.com/KarimAziev/npmjs.git ~/.emacs.d/npmjs/
#+end_src

Add the downloaded directory to the load path:

#+begin_src elisp :eval no
(add-to-list 'load-path "~/.emacs.d/npmjs/")
(require 'npmjs)
#+end_src

#+begin_src elisp :eval no
(use-package npmjs
:straight (npmjs
:repo "KarimAziev/npmjs"
:type git
:host github)
:commands (npmjs)
:bind ((:map npmjs-multi-completion-map
("C-" . npmjs-throw-done)
("C-M-j" . npmjs-throw-done))))
#+end_src

** Usage

Just run:

#+begin_example
M-x npmjs RET
#+end_example