npm: add --yes to init and add shortform options (#13634)

* npm: add --yes to init and add shortform options

* Update npm.md

* Update npm.md

* Update npm.md

* Update npm.md

* Update npm.md

* Update npm.md

* Update npm.md

* Update npm.md
This commit is contained in:
Managor
2024-09-08 18:52:28 +03:00
committed by GitHub
parent 2545d6e0dd
commit bbe3ca269d
6 changed files with 20 additions and 20 deletions

View File

@@ -4,9 +4,9 @@
> Manage Node.js projects and their module dependencies.
> More information: <https://www.npmjs.com>.
- Interactively create a `package.json` file:
- Create a `package.json` file with default values (omit --yes to do it interactively):
`npm init`
`npm init {{-y|--yes}}`
- Download all the packages listed as dependencies in `package.json`:
@@ -18,11 +18,11 @@
- Download the latest version of a package and add it to the list of dev dependencies in `package.json`:
`npm install {{package_name}} --save-dev`
`npm install {{package_name}} {{-D|--save-dev}}`
- Download the latest version of a package and install it globally:
`npm install --global {{package_name}}`
`npm install {{-g|--global}} {{package_name}}0`
- Uninstall a package and remove it from the list of dependencies in `package.json`:
@@ -34,4 +34,4 @@
- List top-level globally installed packages:
`npm list --global --depth={{0}}`
`npm list {{-g|--global}} --depth {{0}}`