npm从github pull请求安装 [英] npm install from github pull request
问题描述
在 npm安装文档中查看,它可能会从github repo中安装npm。
是否也可以从拉取请求中专门安装?
解决方案只是基于拉请求的最后一个提交(最后一个)?
GitHub维护一个 namespace 为原始回购中的每个PR,所以这也适用:
npm install< ; user> /< repo>#pull /< id> / head
例如:
npm i --save-dev json-schema-faker / json-schema-faker#pull / 129 / head
或使用纱线:
yarn add< user> /< repo>#< id> / head
$ p例如:
$ byarn add json-schema-faker / json -schema-FAK er#129 / head
请注意,在Yarn情况下,没有
如果您需要自动删除PR所在的安装或repo /分支,这可能会有所帮助。另见修改一个在GitHub上本地停用拉动请求。
Loooking at the npm install docs it looks possible to npm install from a github repo.
Is it also possible to install specifically from a pull request?
Is the solution just to install based on the last commit (last sha) of the pull request?
解决方案GitHub is maintaining a namespace for each PR in the original repo, so this works as well:
npm install <user>/<repo>#pull/<id>/head
NOTE: It doesn't seeem to be working with NPM v. 5. See the comment below.
for example:
npm i --save-dev json-schema-faker/json-schema-faker#pull/129/head
or with yarn:
yarn add <user>/<repo>#<id>/head
for example:
yarn add json-schema-faker/json-schema-faker#129/head
Note that in Yarn case there is no
pull/
segment in the package identifier.This may be helpful if you need to automate the installation or repo / branch from where PR is originating is removed. See also Modifying an inactive pull request locally at GitHub.
这篇关于npm从github pull请求安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!