git-remote-url
Advanced tools
Comparing version
{ | ||
"name": "git-remote-url", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Get a remote URL of a git repository", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -7,1 +7,21 @@ # git-remote-url | ||
[](https://david-dm.org/marco-c/git-remote-url#info=devDependencies) | ||
# API | ||
The function exported by the module accepts two parameters: | ||
- `directory`: the directory of the git repository; | ||
- `remote`: the name of the remote you're interested in. | ||
It returns a promise that resolves to the URL of the remote. | ||
# Example | ||
```JavaScript | ||
var gitRemoteUrl = require('git-remote-url'); | ||
gitRemoteUrl('.', 'origin').then(function(url) { | ||
console.log('URL is ' + url); | ||
}); | ||
``` |
2540
18.86%27
285.71%