【问题标题】:How to create NPM scoped packages with git如何使用 git 创建 NPM 范围的包
【发布时间】:2021-03-27 08:43:17
【问题描述】:

我想在不为 npm 私有注册表付费的情况下创建范围包。 我有一个私人 git 存储库(可通过 ssh 访问),但没有关于如何执行此操作以及使用哪种语法的文档。

【问题讨论】:

    标签: git npm ssh scope


    【解决方案1】:

    您必须运行自己的私有注册表。例如:npm Registry for your organisation

    然后如npm scope documentation中所述

    您可以在登录时将范围与注册表关联,例如

    npm login --registry=http://reg.example.com --scope=@myco
    

    您还可以使用 npm config 将范围与注册表关联:

    npm config set @myco:registry http://reg.example.com
    

    【讨论】:

    猜你喜欢
    • 2018-09-11
    • 2019-08-21
    • 1970-01-01
    • 2017-08-27
    • 1970-01-01
    • 1970-01-01
    • 2016-05-09
    • 2020-07-05
    • 1970-01-01
    相关资源
    最近更新 更多