Skip to content

Update specifying-dependencies-and-devdependencies-in-a-package-json-… #1221

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading