8bbef9180e3ba16e717a9587d0c965ab901c1226

Author
Erwan ROUSSEL <erwan.roussel51@gmail.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

Npm's plugin documentation (#6864)

* Documentation for Npm plugin added

* Fix style and add alias descriptions

Diff

 1diff --git a/plugins/npm/README.md b/plugins/npm/README.md
 2new file mode 100644
 3index 0000000000000000000000000000000000000000..202e2b0a47fe2931cfd6074851a6a0a4db0460f0
 4--- /dev/null
 5+++ b/plugins/npm/README.md
 6@@ -0,0 +1,26 @@
 7+## npm plugin
 8+
 9+The npm plugin provides completion as well as adding many useful aliases.
10+
11+To use it, add npm to the plugins array of your zshrc file:
12+```
13+plugins=(... npm)
14+```
15+
16+## Aliases
17+
18+| Alias   | Command                      | Descripton                                                      |
19+|:------  |:-----------------------------|:----------------------------------------------------------------|
20+| `npmg`  | `npm i -g`                   | Install dependencies globally                                   |
21+| `npmS`  | `npm i -S`                   | Install and save to dependencies in your package.json           |
22+| `npmD`  | `npm i -D`                   | Install and save to dev-dependencies in your package.json       |
23+| `npmE`  | `PATH="$(npm bin)":"$PATH"`  | Run command from node_modules folder based on current directory |
24+| `npmO`  | `npm outdated`               | Check which npm modules are outdated                            |
25+| `npmV`  | `npm -v`                     | Check package versions                                          |
26+| `npmL`  | `npm list`                   | List installed packages                                         |
27+| `npmL0` | `npm ls --depth=0`           | List top-level installed packages                               |
28+| `npmst` | `npm start`                  | Run npm start                                                   |
29+| `npmt`  | `npm test`                   | Run npm test                                                    |
30+| `npmR`  | `npm run`                    | Run npm scripts                                                 |
31+| `npmP`  | `npm publish`                | Run npm publish                                                 |
32+| `npmI`  | `npm init`                   | Run npm init                                                    |