summaryrefslogtreecommitdiffstats
path: root/bin/build.js
diff options
context:
space:
mode:
Diffstat (limited to 'bin/build.js')
-rw-r--r--bin/build.js20
1 files changed, 12 insertions, 8 deletions
diff --git a/bin/build.js b/bin/build.js
index 6050b88..9f3ad1d 100644
--- a/bin/build.js
+++ b/bin/build.js
@@ -24,16 +24,20 @@ var buildFunc = function(dir, options) {
return null;
})
.then(function(repoID) {
- var githubID = options.github || repoID;
+ var title = options.title;
- if(!githubID) {
- throw new Error('Needs a githubID (username/repo). Either set repo origin to a github repo or use the -g flag');
- }
+ if (!title) {
+ var githubID = options.github || repoID;
+
+ if(!githubID) {
+ throw new Error('Needs a githubID (username/repo). Either set repo origin to a github repo or use the -g flag');
+ }
- var parts = githubID.split('/', 2);
- var user = parts[0], repo = parts[1];
+ var parts = githubID.split('/', 2);
+ var user = parts[0], repo = parts[1];
- var title = options.title || utils.titleCase(repo);
+ title = options.title || utils.titleCase(repo);
+ }
return generate.folder(
_.extend(options.options || {}, {
@@ -110,4 +114,4 @@ var buildFiles = function(dir, outputFile, options, masterOptions) {
module.exports = {
folder: buildFunc,
files: buildFiles
-}; \ No newline at end of file
+};