summaryrefslogtreecommitdiffstats
path: root/bin/gitbook.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2014-04-04 14:15:06 -0700
committerSamy Pessé <samypesse@gmail.com>2014-04-04 14:15:06 -0700
commit9bc0bf19da576d1a05e1b83a03de6c8729615783 (patch)
tree6fa84c4af21f7f537a0b03ee5da78bfeb1a61f58 /bin/gitbook.js
parentf49a1a484e73f9be7b4db92c7a083a34722d5f12 (diff)
downloadgitbook-9bc0bf19da576d1a05e1b83a03de6c8729615783.zip
gitbook-9bc0bf19da576d1a05e1b83a03de6c8729615783.tar.gz
gitbook-9bc0bf19da576d1a05e1b83a03de6c8729615783.tar.bz2
Add command line options for changing theme
Diffstat (limited to 'bin/gitbook.js')
-rwxr-xr-xbin/gitbook.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/gitbook.js b/bin/gitbook.js
index 98a492e..894688a 100755
--- a/bin/gitbook.js
+++ b/bin/gitbook.js
@@ -36,6 +36,7 @@ prog
.option('-i, --intro <intro>', 'Description of the book to generate')
.option('-g, --github <repo_path>', 'ID of github repo like : username/repo')
.option('-gh, --githubHost <url>', 'The url of the github host (defaults to https://github.com/')
+.option('--theme <path>', 'Path to theme directory')
.action(buildFunc = function(dir, options) {
dir = dir || process.cwd();
outputDir = options.output || path.join(dir, '_book');
@@ -68,7 +69,8 @@ prog
title: title,
description: options.intro,
github: githubID,
- generator: options.generator
+ generator: options.generator,
+ theme: options.theme
}
);
})
@@ -83,9 +85,11 @@ prog
.description('Build then serve a gitbook from a directory')
.option('-p, --port <port>', 'Port for server to listen on', 4000)
.option('-o, --output <directory>', 'Path to output directory, defaults to ./_book')
+.option('-g, --generator <name>', 'Change generator, defaults to site, availables are: '+_.keys(generators).join(", "))
.option('-t, --title <name>', 'Name of the book to generate, defaults to repo name')
.option('-g, --github <repo_path>', 'ID of github repo like : username/repo')
.option('-gh, --githubHost <url>', 'The url of the github host (defaults to https://github.com/')
+.option('--theme <path>', 'Path to theme directory')
.action(function(dir, options) {
buildFunc(dir, options)
.then(function(outputDir) {