Document how to install branch of Github repo / PR as platform/plugin
I couldn't find any documentation on how to install a branch of a Github Repo (e.g. a PR to one of the Cordova plugins). This should probably be added to https://cordova.apache.org/docs/en/8.x/platform_plugin_versioning_ref/index.html which explains how to install paths, versions etc.
Using a # to separate the branch name from the repo URL worked:
cordova plugin add https://github.com/dudeofawesome/cordova-plugin-statusbar.git#CB-12024cordova-plugin-statusbar
results in package.json:
"dependencies": {
...
"cordova-plugin-statusbar": "git+https://github.com/dudeofawesome/cordova-plugin-statusbar.git#CB-12024cordova-plugin-statusbar",
...
},
It should work exactly like for any npm package AFAICT. So if we add something, we might be able to reference the npm install docs.
Surprisingly https://docs.npmjs.com/cli/install doesn't mention "branch" at all.
But I think #branchname is Git repo convention, correct?
The docs you linked to refer to it as #<commit-ish> since you can specify a tag or a commit hash too.
Ugh, ok.
I think we're better of making it explicit in the Cordova docs then - as it is a pretty common thing for people wanting to check out a PR branch.
Still, adding a link to the underlying functionality docs (if this is really "just" powered by npm install) is probably also a good idea.