小编Dan*_*ams的帖子

运行yarn时,将使用bash中的私有令牌生成yarn.lock文件

我正在使用Gem Fury作为我们的一些私人套餐.我将yarn注册表设置为使用它们的代理用于public和我们的私有节点模块:

yarn config set registry "https://npm-proxy.fury.io/$GEMFURY_TOKEN/username"
Run Code Online (Sandbox Code Playgroud)

GEMFURY_TOKEN是的.bash.yarn config get registry生产:

https://npm-proxy.fury.io/$(GEMFURY_TOKEN)/username
Run Code Online (Sandbox Code Playgroud)

当我们运行时yarn,该yarn.lock文件将生成以下内容:

private-module@0.1.0:
  version "0.1.0"
  resolved "https://npm.fury.io/username/private-module/-/0.1.0.tgz?auth=<GEMFURY TOKEN>"
  dependencies:
    ember-cli-babel "^5.1.6"

private-module-2@0.1.4:
  version "0.1.4"
  resolved "https://npm.fury.io/username/private-module-2/-/0.1.4.tgz?auth=<GEMFURY TOKEN>"
  dependencies:
    ember-cli-babel "^5.1.6"
    ember-inflector "^1.9.6"
Run Code Online (Sandbox Code Playgroud)

我不想在git存储库中使用私有令牌.有没有办法可以排除令牌yarn.lock在生成时被添加到文件中?

npm gem-fury yarnpkg

14
推荐指数
1
解决办法
693
查看次数

标签 统计

gem-fury ×1

npm ×1

yarnpkg ×1