mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-29 23:24:55 +02:00
Merge pull request #753 from igorshubovych/npm
npm: removed some examples and added others
This commit is contained in:
commit
d419abe00b
1 changed files with 12 additions and 15 deletions
|
@ -1,31 +1,28 @@
|
||||||
# npm
|
# npm
|
||||||
|
|
||||||
> Node package manager, to manage Node.js projects and install module dependencies.
|
> JavaScript and Node.js package manager.
|
||||||
|
> Manage Node.js projects and their module dependencies.
|
||||||
- Create a new project in the current folder:
|
|
||||||
|
|
||||||
`npm init`
|
|
||||||
|
|
||||||
- Download all dependencies referenced in package.json:
|
|
||||||
|
|
||||||
`npm install`
|
|
||||||
|
|
||||||
- Download and install a module globally:
|
- Download and install a module globally:
|
||||||
|
|
||||||
`npm install -g {{module_name}}`
|
`npm install -g {{module_name}}`
|
||||||
|
|
||||||
|
- Download all dependencies referenced in package.json:
|
||||||
|
|
||||||
|
`npm install`
|
||||||
|
|
||||||
- Download a given dependency, and add it to the package.json:
|
- Download a given dependency, and add it to the package.json:
|
||||||
|
|
||||||
`npm install {{module_name}}@{{version}} --save`
|
`npm install {{module_name}}@{{version}} --save`
|
||||||
|
|
||||||
- Set the version of the current project:
|
- Uninstall a module:
|
||||||
|
|
||||||
`npm version {{1.2.3}}`
|
`npm uninstall {{module_name}}`
|
||||||
|
|
||||||
- Publish the current project:
|
- List a tree of installed modules:
|
||||||
|
|
||||||
`npm publish`
|
`npm list`
|
||||||
|
|
||||||
- Cleanup packages (removes packages which are installed but are not listed in `package.json`):
|
- Interactively create a package.json file:
|
||||||
|
|
||||||
`npm prune`
|
`npm init`
|
||||||
|
|
Loading…
Add table
Reference in a new issue