2018-10-03 15:59:30 +00:00
|
|
|
# node plugin
|
|
|
|
|
2020-10-22 17:46:22 +00:00
|
|
|
This plugin provides many a aliases and a few `node-docs` functions.
|
2020-03-11 18:57:46 +00:00
|
|
|
|
2020-10-22 17:46:22 +00:00
|
|
|
## Aliases
|
2020-03-11 18:57:46 +00:00
|
|
|
|
2020-10-22 17:46:22 +00:00
|
|
|
| Alias | Command |
|
|
|
|
|:---------------------|:-------------------------------------------------------------------------------|
|
|
|
|
| nd | node |
|
|
|
|
| ndc | node --check |
|
|
|
|
| nde | node --eval "script" |
|
|
|
|
| ndh | node --help |
|
|
|
|
| ndi | git --interactive |
|
|
|
|
| ndr | git --require module |
|
|
|
|
|----------------------|--------------------------------------------------------------------------------|
|
|
|
|
| ndnd | node --no-depreciation |
|
|
|
|
| ndnw | node --no-warnings |
|
|
|
|
| ndtw | node --trace-warnings |
|
|
|
|
| ndv8 | node --V8-options |
|
|
|
|
|----------------------|--------------------------------------------------------------------------------|
|
2018-10-03 15:59:30 +00:00
|
|
|
|
2020-10-22 17:46:22 +00:00
|
|
|
## Functions
|
2018-10-03 15:59:30 +00:00
|
|
|
|
|
|
|
```zsh
|
|
|
|
# Opens https://nodejs.org/docs/latest-v10.x/api/fs.html
|
|
|
|
$ node-docs fs
|
|
|
|
# Opens https://nodejs.org/docs/latest-v10.x/api/path.html
|
2020-03-11 18:57:46 +00:00
|
|
|
$ node-docs path
|
2018-10-03 15:59:30 +00:00
|
|
|
```
|
2020-10-22 17:46:22 +00:00
|
|
|
|
|
|
|
This plugin adds `node-docs` function that opens specific section in [Node.js](https://nodejs.org)
|
|
|
|
documentation (depending on the installed version).
|
|
|
|
|
|
|
|
## Add plugin
|
|
|
|
To use it, add `node` to the plugins array of your zshrc file:
|
|
|
|
|
|
|
|
```zsh
|
|
|
|
plugins=(... node)
|
|
|
|
```
|