我将 Gem Fury 用于我们的一些私人包。我将纱线注册表设置为将它们的代理用于公共和我们的私有节点模块:
yarn config set registry "https://npm-proxy.fury.io/$GEMFURY_TOKEN/username"
GEMFURY_TOKEN设置在.bash. yarn config get registry产生:
https://npm-proxy.fury.io/$(GEMFURY_TOKEN)/username
当我们运行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"
我不想在 git 存储库中使用私有令牌。有没有办法可以yarn.lock在生成时排除令牌添加到文件中?