diff options
author | Samy Pessé <samypesse@gmail.com> | 2014-07-11 17:42:16 -0700 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2014-07-11 17:42:16 -0700 |
commit | 3842e5bf4a42f75aed9ed413047a503920226589 (patch) | |
tree | 46a6624f18381a8abb682cfd0b9941a2bc6032cf /bin/gitbook.js | |
parent | 1b87cec893806928a9f26bfe5e04102645dad0e5 (diff) | |
parent | f05b138fd6cbd46ff72ca45bb8f08994df9035b0 (diff) | |
download | gitbook-3842e5bf4a42f75aed9ed413047a503920226589.zip gitbook-3842e5bf4a42f75aed9ed413047a503920226589.tar.gz gitbook-3842e5bf4a42f75aed9ed413047a503920226589.tar.bz2 |
Merge pull request #358 from GitbookIO/featureplatform
Add base command git:push and git:remote
Diffstat (limited to 'bin/gitbook.js')
-rwxr-xr-x | bin/gitbook.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/bin/gitbook.js b/bin/gitbook.js index b868925..2020519 100755 --- a/bin/gitbook.js +++ b/bin/gitbook.js @@ -14,6 +14,7 @@ var fs = require('../lib/generate/fs'); var utils = require('./utils'); var build = require('./build'); var Server = require('./server'); +var platform = require("./platform"); // General options prog @@ -115,6 +116,22 @@ prog return initDir(dir); }); +prog +.command('git:push [source_dir]') +.description('Publish content to the associated gitbook.io book') +.action(function(dir) { + dir = dir || process.cwd(); + return platform.publish(dir); +}); + +prog +.command('git:remote [source_dir] [book_id]') +.description('Adds a git remote to a book repository') +.action(function(dir, bookId) { + dir = dir || process.cwd(); + return platform.remote(dir, bookId); +}); + // Parse and fallback to help if no args if(_.isEmpty(prog.parse(process.argv).args) && process.argv.length === 2) { prog.help(); |