Skip to content

Commit 4ded45e

Browse files
committed
docs(readme): add table with current available aliases
1 parent 5514f9d commit 4ded45e

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,27 @@ Add `antigen bundle trystan2k/zsh-npm-plugin` into `.zshrc`
2727
### Using [zgen](https://github.com/tarjoilija/zgen)
2828

2929
Add `zgen load trystan2k/zsh-npm-plugin` into `.zshrc`
30+
31+
## Aliases
32+
33+
| Alias | Command | Descripton |
34+
| :-------- | :-------------------------- | :-------------------------------------------------------------- |
35+
| `npmg` | `npm i -g` | Install dependencies globally |
36+
| `npmi` | `npm i` | Install dependencies locally |
37+
| `npmS` | `npm i -S` | Install and save to dependencies in your package.json |
38+
| `npmD` | `npm i -D` | Install and save to dev-dependencies in your package.json |
39+
| `npmE` | `PATH="$(npm bin)":"$PATH"` | Run command from node_modules folder based on current directory |
40+
| `npmO` | `npm outdated` | Check which npm modules are outdated |
41+
| `npmV` | `npm -v` | Check package versions |
42+
| `npmL` | `npm list` | List installed packages |
43+
| `npmL0` | `npm ls --depth=0` | List top-level installed packages |
44+
| `npmlsg` | `npm list -g` | List installed packages globally |
45+
| `npmlsg0` | `npm list -g --depth=0` | List top-level installed packages globally |
46+
| `npmst` | `npm start` | Run npm start |
47+
| `npmt` | `npm test` | Run npm test |
48+
| `npmR` | `npm run` | Run npm scripts |
49+
| `npmP` | `npm publish` | Run npm publish |
50+
| `npmNew` | `npm init` | Run npm init |
51+
| `npmclr!` | `rm -rf ./node_modules/` | Clear node_modules in current directory |
52+
| `nre!` | `npmclr! && npmi` | Reinstall packages |
53+
| `npmF` | `npm search` | Search in the npm database |

npm.plugin.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ alias npmNew="npm init"
5656
# ! for prevent accidental run
5757
alias npmclr!="rm -rf ./node_modules/"
5858

59-
# Reinstall package
59+
# Reinstall packages
6060
# ! for prevent accidental run
6161
alias nre!="npmclr! && npmi"
6262

0 commit comments

Comments
 (0)