2019-11-05 14:55:08 -05:00
|
|
|
---
|
2019-11-18 21:01:39 +02:00
|
|
|
section: cli-commands
|
2019-11-05 14:55:08 -05:00
|
|
|
title: npm-shrinkwrap
|
|
|
|
description: Lock down dependency versions for publication
|
|
|
|
---
|
|
|
|
|
2019-11-18 21:01:39 +02:00
|
|
|
# npm-shrinkwrap(1)
|
2019-11-05 14:55:08 -05:00
|
|
|
|
|
|
|
## Lock down dependency versions for publication
|
|
|
|
|
|
|
|
### Synopsis
|
|
|
|
|
|
|
|
```bash
|
|
|
|
npm shrinkwrap
|
|
|
|
```
|
|
|
|
|
|
|
|
### Description
|
|
|
|
|
|
|
|
This command repurposes `package-lock.json` into a publishable
|
|
|
|
`npm-shrinkwrap.json` or simply creates a new one. The file created and updated
|
|
|
|
by this command will then take precedence over any other existing or future
|
|
|
|
`package-lock.json` files. For a detailed explanation of the design and purpose
|
2019-11-18 21:01:39 +02:00
|
|
|
of package locks in npm, see [package-locks](/configuring-npm/package-locks).
|
2019-11-05 14:55:08 -05:00
|
|
|
|
|
|
|
### See Also
|
|
|
|
|
2020-10-02 17:52:19 -04:00
|
|
|
* [npm install](/cli-commands/install)
|
|
|
|
* [npm run-script](/cli-commands/run-script)
|
2019-11-05 14:55:08 -05:00
|
|
|
* [npm scripts](/using-npm/scripts)
|
|
|
|
* [package.js](/configuring-npm/package-json)
|
|
|
|
* [package-locks](/configuring-npm/package-locks)
|
|
|
|
* [package-lock.json](/configuring-npm/package-lock-json)
|
|
|
|
* [shrinkwrap.json](/configuring-npm/shrinkwrap-json)
|
2020-10-02 17:52:19 -04:00
|
|
|
* [npm ls](/cli-commands/ls)
|