首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >NodeJS中特定于OS的包依赖项

NodeJS中特定于OS的包依赖项
EN

Stack Overflow用户
提问于 2016-07-21 05:27:06
回答 1查看 1.1K关注 0票数 0

我必须使用npm包email-templates,它指出,在OS或Ubuntu/Linux上开发是建议的。

由于我们的团队中有其他人在Windows环境中,所以为了避免这个依赖问题,我开始寻找其他的东西。

然后我找到了email-templates-windows,它声明要安装:

Unix/OS X

npm install email-templates

Windows

npm install email-templates-windows

是否有任何方法可以指定这种类型的npm包依赖关系,以便它根据操作系统安装正确的包?

EN

回答 1

Stack Overflow用户

发布于 2018-10-04 11:42:04

代码语言:javascript
复制
dependencies: { "common-stuff": "*" }
overrides: {
   "os": {
      "linux": {
         "dependencies": { "email-templates-windows" }
      },
      "win32": {
         "dependencies": { "email-templates-windows" }
      }
    }
}

会很好吧嗯?

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/38495519

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档