Skip to content

Commit

Permalink
Update specifying-dependencies-and-devdependencies-in-a-package-json-… (
Browse files Browse the repository at this point in the history
#1221)

…file.mdx

mention shortcut flags

<!-- What / Why -->
for convenience, mention abbreviated versions of `--save-prod` and
`--save-dev`
  • Loading branch information
shallow-beach committed Aug 8, 2024
1 parent 3541e52 commit 35e17e8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ You can add dependencies to a `package.json` file from the command line or by ma

### Adding dependencies to a `package.json` file from the command line

To add dependencies and devDependencies to a `package.json` file from the command line, you can install them in the root directory of your package using the `--save-prod` flag for dependencies (the default behavior of `npm install`) or the `--save-dev` flag for devDependencies.
To add dependencies and devDependencies to a `package.json` file from the command line, you can install them in the root directory of your package using the `--save-prod` flag (also `-S`) for dependencies (the default behavior of `npm install`) or the `--save-dev` flag (also `-D`) for devDependencies.

To add an entry to the `"dependencies"` attribute of a `package.json` file, on the command line, run the following command:

Expand Down

0 comments on commit 35e17e8

Please sign in to comment.