选择命令行版本:
🌐 Synopsis
npm shrinkwrap
注意:此命令不支持工作区。
🌐 Note: This command is unaware of workspaces.
🌐 Description
此命令将 package-lock.json 重新用作可发布的 npm-shrinkwrap.json,或干脆创建一个新的 npm-shrinkwrap.json。此命令创建和更新的文件将优先于任何现有或将来的 package-lock.json 文件。有关 npm 中包锁的设计和用途的详细说明,请参阅 package-lock-json。
🌐 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 of package locks in npm, see package-lock-json.
🌐 See Also