Skip to content

Latest commit

 

History

History
30 lines (17 loc) · 909 Bytes

README.zh-CN.md

File metadata and controls

30 lines (17 loc) · 909 Bytes

replace-lockfile-registry

npm

English | 简体中文

替换 package-lock.jsonyarn.lockpnpm-lock.yaml 的源。

使用

npx replace-lockfile-registry

默认会将 package-lock.jsonyarn.lockpnpm-lock.yaml 中的源替换为 npm config get registry 得到的源。如果需要指定源和替换的文件可以使用 --registry--lockfile 选项。

选项

--registry

指定 registry,例如:

  • npx replace-lockfile-registry --registry https://registry.npmjs.org/
  • npx replace-lockfile-registry --registry https://registry.npmmirror.com/

--lockfile

指定锁文件,可以同时指定多个,例如:

  • npx replace-lockfile-registry --lockfile ./package-lock.json ./yarn.lock