mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
23 lines
598 B
Plaintext
23 lines
598 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, common]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# npm shrinkwrap
|
|
|
|
> Lock down the dependencies of a package, creating a `npm-shrinkwrap.json` file.
|
|
> Similar to `package-lock.json` but intended for published packages.
|
|
> More information: <https://docs.npmjs.com/cli/shrinkwrap/>.
|
|
|
|
- Generate a `npm-shrinkwrap.json` file from the current `package-lock.json`:
|
|
|
|
`npm shrinkwrap`
|
|
|
|
- Run in production mode (excludes devDependencies):
|
|
|
|
`npm shrinkwrap --production`
|
|
|
|
- Force recreate the shrinkwrap file even if it already exists:
|
|
|
|
`npm shrinkwrap --force`
|