【问题标题】:Is there any way we can import one specific lerna package from another repo有什么方法可以从另一个仓库导入一个特定的 lerna 包
【发布时间】:2020-08-10 04:58:52
【问题描述】:

新手问题 - 不确定我是否做错了什么。有没有办法从 lerna 存储库中导入特定的包?

设计系统回购

// ./lerna.js
{
  "packages": [
    "packages/Button",
    "..."
  ],
}

// ./packages/Button/package.json
{
  name: "@namespace/button"
}

应用程序仓库

// ./package.json
{
  "dependencies": {
    "@namespace/button": "git+ssh://git@github.com/design-system-private/repo.git",
  }
}

似乎下载了根设计系统仓库,但没有下载按钮。

【问题讨论】:

    标签: package lerna


    【解决方案1】:

    您需要对要使用的内部包进行版本控制。

        // ./package.json
        {
          "dependencies": {
            "@namespace/button": "1.0.0",
          }
        }
        
        // ./lerna.js
        {
          "packages": [
            "packages/Button",
            "..."
          ],
        }
        
        // ./packages/Button/package.json
        {
          name: "@namespace/button",
          "version": "1.0.0",
        }
    

    【讨论】:

      猜你喜欢
      • 2013-10-03
      • 2017-10-23
      • 2017-12-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-07-29
      • 2017-06-06
      • 2016-06-26
      相关资源
      最近更新 更多