diff options
author | Samy Pessé <samypesse@gmail.com> | 2014-04-04 09:53:05 -0700 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2014-04-04 09:53:05 -0700 |
commit | 3da53d56a2ac0b6652b52b74a974747d9df8662e (patch) | |
tree | 1d3f9e15918008cebbbc782aaa3aba30dca932f1 /bin/gitbook.js | |
parent | 91359fab1e79f8d371e72b6efcb469fb89c3be8b (diff) | |
download | gitbook-3da53d56a2ac0b6652b52b74a974747d9df8662e.zip gitbook-3da53d56a2ac0b6652b52b74a974747d9df8662e.tar.gz gitbook-3da53d56a2ac0b6652b52b74a974747d9df8662e.tar.bz2 |
Add option -g to choice generator
Add base json generator
Diffstat (limited to 'bin/gitbook.js')
-rwxr-xr-x | bin/gitbook.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/gitbook.js b/bin/gitbook.js index 6e29986..7baad48 100755 --- a/bin/gitbook.js +++ b/bin/gitbook.js @@ -10,6 +10,7 @@ var fs = require('fs'); var pkg = require('../package.json'); var generate = require("../lib/generate"); var parse = require("../lib/parse"); +var generators = require("../lib/generate").generators; var utils = require('./utils'); @@ -25,6 +26,7 @@ prog .command('build [source_dir]') .description('Build a gitbook from a directory') .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('-i, --intro <intro>', 'Description of the book to generate') .option('-g, --github <repo_path>', 'ID of github repo like : username/repo') @@ -60,7 +62,8 @@ prog { title: title, description: options.intro, - github: githubID + github: githubID, + generator: options.generator } ); }) |