diff options
Diffstat (limited to 'node_modules/hosted-git-info/README.md~')
-rw-r--r-- | node_modules/hosted-git-info/README.md~ | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/node_modules/hosted-git-info/README.md~ b/node_modules/hosted-git-info/README.md~ index f6f1dcf9e..82ddf605d 100644 --- a/node_modules/hosted-git-info/README.md~ +++ b/node_modules/hosted-git-info/README.md~ @@ -40,13 +40,7 @@ Given the path of a file relative to the repository, returns a URL for directly fetching it from the githost. If no comittish was set then `master` will be used as the default. -<<<<<<< HEAD For example `hostedGitInfo.fromUrl("git@github.com:npm/hosted-git-info.git#v1.0.0").file("package.json")` -||||||| merged common ancestors -For example `hostedGitInfo("git@github.com:npm/hosted-git-info.git").file("v1.0.0")` -======= -For example `hostedGitInfo.fromUrl("git@github.com:npm/hosted-git-info.git").file("v1.0.0")` ->>>>>>> Another README fix would return `https://raw.githubusercontent.com/npm/hosted-git-info/v1.0.0/package.json` * info.shortcut() @@ -81,6 +75,23 @@ eg, `git@github.com:npm/hosted-git-info.git` eg, `npm/hosted-git-info` +* info.getDefaultRepresentation() + +Returns the default output type. The default output type is based on the +string you passed in to be parsed + +* info.toString() + +Uses the getDefaultRepresentation to call one of the other methods to get a URL for +this resource. As such `hostedGitInfo.fromUrl(url).toString()` will give +you a normalized version of the URL that still uses the same protocol. + +Shortcuts will still be returned as shortcuts, but the special case github +form of `org/project` will be normalized to `github:org/project`. + +SSH connect strings will be normalized into `git+ssh` URLs. + + ## Supported hosts Currently this supports Github, Bitbucket and Gitlab. Pull requests for |