mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-29 23:24:55 +02:00
commit
eff31b50ce
1 changed files with 27 additions and 0 deletions
27
pages/common/yarn.md
Normal file
27
pages/common/yarn.md
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
# yarn
|
||||||
|
|
||||||
|
> JavaScript and Node.js package manager alternative.
|
||||||
|
|
||||||
|
- Install a module globally:
|
||||||
|
|
||||||
|
`yarn global add {{module_name}}`
|
||||||
|
|
||||||
|
- Install all dependencies referenced in the package.json file:
|
||||||
|
|
||||||
|
`yarn`
|
||||||
|
|
||||||
|
- Install a module and save it as a dependency to the package.json file (add --dev to save as a dev dependency):
|
||||||
|
|
||||||
|
`yarn add {{module_name}}@{{version}}`
|
||||||
|
|
||||||
|
- Uninstall a module and remove it from the package.json file:
|
||||||
|
|
||||||
|
`yarn remove {{module_name}}`
|
||||||
|
|
||||||
|
- Interactively create a package.json file:
|
||||||
|
|
||||||
|
`yarn init`
|
||||||
|
|
||||||
|
- Identify whether a module is a dependency and list other modules that depend upon it:
|
||||||
|
|
||||||
|
`yarn why {{module_name}}`
|
Loading…
Add table
Reference in a new issue