根据环境使用不同的节点模块?
我有一个用于多个项目的NPM软件包。当前,当我想更改这些项目上需要更改NPM软件包时,我需要更改NPM软件包,提交PR,等待有人为我合并,然后我可以实际测试我在其他项目上进行的更改(当前没有进行测试)。
我想做的是在其他项目上可以安装 /使用本地模块,而不是全局模块,以便在提交任何PRS之前可以测试全流量。即时通讯使用confip package,理想情况下,我可以将其设置为其,因此,如果我使用特定的配置文件,则默认为本地NPM软件包而不是全局。
这可能吗?
I have a npm package that we use for multiple projects. Currently when I want to make a change to something on these projects that requires a change on the npm package I need to make a change to the npm package, submit a pr, wait for someone to merge it for me and then I can actually test the changes I made on the other projects (no testing is set up currently sadly).
What I want to do is on the other projects have a way to install / use the local module instead of the global one so I can test the full flow before I submit any prs. Im using config package and ideally I can set it up so if I use a specific config file it defaults to local npm package instead of global.
Is this possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据您所描述的内容,请查看软件包管理人员提供的
link
命令,以帮助解决此问题:Based on what you are describing, take look at the
link
command offered by package managers to help solve this: