summaryrefslogtreecommitdiffstats
path: root/lib/generate/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/generate/index.js')
-rw-r--r--lib/generate/index.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/generate/index.js b/lib/generate/index.js
index 0c3e693..0e7eb6c 100644
--- a/lib/generate/index.js
+++ b/lib/generate/index.js
@@ -63,6 +63,20 @@ var generate = function(options) {
// Clean output folder
return fs.remove(options.output)
+ // Get repo's URL
+ .then(function() {
+ return parse.git.url(options.input)
+ .then(function(_url) {
+ // Get ID of repo
+ return parse.git.githubID(_url);
+ }, function(err) {
+ return null;
+ })
+ .then(function(repoId) {
+ options.github = options.github || repoId;
+ });
+ })
+
.then(function() {
return fs.mkdirp(options.output);
})