【问题标题】:Publish as npm library to github with source code but on install should get the files present in dist使用源代码作为 npm 库发布到 github,但在安装时应该获取 dist 中存在的文件
【发布时间】:2018-09-07 15:34:12
【问题描述】:

我想将代码与 dist 文件夹一起推送到 git hub,但是在输入命令 npm i <github-url> 时,我应该将文件放到 dist 中的 node_modules 中。

【问题讨论】:

    标签: angular reactjs github npm ng-packagr


    【解决方案1】:

    您可以在您的存储库中创建一个孤立分支,并且只将带有package.jsondist 文件夹推到那里。

    然后你可以指向 NPM 从那个分支安装依赖项

    npm install username/repo#branchName --save
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-04-03
      • 2021-05-17
      • 2017-09-22
      • 1970-01-01
      • 2021-11-24
      • 1970-01-01
      • 2014-01-18
      • 1970-01-01
      相关资源
      最近更新 更多