@aajuarezd/rb-package 中文文档教程
rb-package
Rebuild your package.json from your package-lock.json
有时,由于 package-lock.json,只能在你的 from 中安装依赖项, 但是如果你不保持 package-lock.json 和 package.json 之间的一致性,你可能 陷入依赖关系的麻烦。 例如,当您不对您的 包锁并在没有包锁的另一端下载存储库, 您的项目可能会在构建或其他问题上失败。
这个小包公开了你可以执行的命令来重建你的 package.json 使用 package-lock.json 中的依赖项版本,生成一个名为 平面包.json。 只需运行下一个命令并在你的 npm 项目中使用 rb-package 该工具将在该目录中创建文件。
npm install -g @aajuarezd/rb-package
cd ../route/to/your/project
rb-package
rb-package
Rebuild your package.json from your package-lock.json
Sometimes install dependencies in your from works only thanks to package-lock.json, but if you don't keep congruency between package-lock.json and package.json you may fall in trouble with your dependencies. For example, when you don't version your package-lock and download the repository in other side where you don't have package-lock, your project could fail in building or other troubles.
This little package exposes and command you can execute to rebuid your package.json with the dependencies version in your package-lock.json, generating a new file named flat-package.json. Just run the next commands and use rb-package in your npm project and this tool will create the file just in that directory.
npm install -g @aajuarezd/rb-package
cd ../route/to/your/project
rb-package