从Github文件夹安装依赖项

时间:2020-09-03 06:42:05

标签: node.js github npm

我希望能够直接从Github安装每个软件包,而不是使用Lerna配置monorepo将每个文件夹作为作用域npm软件包发布。

https://github.com/{user}/{repo}/tree/master/{folder}/{folder}
https://github.com/{user}/{repo}/tree/master/{folder}/{folder}/package.json
https://github.com/{user}/{repo}/tree/master/{folder}/{folder}/*

但这似乎不可能吗?

yarn add https://github.com/{user}/{repo}/tree/master/folder/folder

这不起作用(无压缩包错误)

yarn add https://github.com/{user}/{repo}/tarball/master/folder/folder

这将安装整个https://github.com/{user}/{repo}/存储库

也许这个问题重复了吗? npm install package from github repo subfolder,但不确定是否是相同的用例。

0 个答案:

没有答案