diff options
author | Samy Pessé <samypesse@gmail.com> | 2014-04-21 22:58:51 +0200 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2014-04-21 22:58:51 +0200 |
commit | f86c27b090ab88598679b7e69b87c3286bdc7a17 (patch) | |
tree | 1b8680536cb7f7f88639eaf8e6a7a5805ff09b7c /bin/gitbook.js | |
parent | b5b8ed72a55e0a6a23aa7695ab223a0e7c8c7cc6 (diff) | |
download | gitbook-f86c27b090ab88598679b7e69b87c3286bdc7a17.zip gitbook-f86c27b090ab88598679b7e69b87c3286bdc7a17.tar.gz gitbook-f86c27b090ab88598679b7e69b87c3286bdc7a17.tar.bz2 |
Add option --pluginsConfig
Diffstat (limited to 'bin/gitbook.js')
-rwxr-xr-x | bin/gitbook.js | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/bin/gitbook.js b/bin/gitbook.js index d254c10..88ba5e2 100755 --- a/bin/gitbook.js +++ b/bin/gitbook.js @@ -17,22 +17,11 @@ var build = require('./build'); prog .version(pkg.version); -var buildCommand = function(command) { - return command - .option('-o, --output <directory>', 'Path to output directory, defaults to ./_book') - .option('-f, --format <name>', 'Change generation format, defaults to site, availables are: '+_.keys(generators).join(", ")) - .option('-t, --title <name>', 'Name of the book to generate, default is extracted from readme') - .option('-i, --intro <intro>', 'Description of the book to generate, default is extracted from readme') - .option('-g, --github <repo_path>', 'ID of github repo like : username/repo') - .option('--githubHost <url>', 'The url of the github host (defaults to https://github.com/') - .option('--plugins <plugins>', 'List of plugins to use separated by ":"'); -}; - -buildCommand(prog.command('build [source_dir]')) +build.command(prog.command('build [source_dir]')) .description('Build a gitbook from a directory') .action(build.folder); -buildCommand(prog.command('serve [source_dir]')) +build.command(prog.command('serve [source_dir]')) .description('Build then serve a gitbook from a directory') .option('-p, --port <port>', 'Port for server to listen on', 4000) .action(function(dir, options) { @@ -50,7 +39,7 @@ buildCommand(prog.command('serve [source_dir]')) }); }); -buildCommand(prog.command('pdf [source_dir]')) +build.command(prog.command('pdf [source_dir]')) .description('Build a gitbook as a PDF') .option('-pf, --paperformat <format>', 'PDF paper format (default is A4): "5in*7.5in", "10cm*20cm", "A4", "Letter"') .action(function(dir, options) { @@ -60,7 +49,7 @@ buildCommand(prog.command('pdf [source_dir]')) })); }); -buildCommand(prog.command('ebook [source_dir]')) +build.command(prog.command('ebook [source_dir]')) .description('Build a gitbook as a eBook') .option('-c, --cover <path>', 'Cover image, default is cover.png if exists') .action(function(dir, options) { |