diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-01-24 23:14:32 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-01-24 23:14:32 +0100 |
commit | 2c57a37afbf84fd319aafba68b29f9f4bada44a9 (patch) | |
tree | ebec07fe7d66711ea66d965778589c7f2e6f4f6d /lib/index.js | |
parent | 244b0f8efc801c3eda831b2b4cfdf1bbea29a774 (diff) | |
download | gitbook-2c57a37afbf84fd319aafba68b29f9f4bada44a9.zip gitbook-2c57a37afbf84fd319aafba68b29f9f4bada44a9.tar.gz gitbook-2c57a37afbf84fd319aafba68b29f9f4bada44a9.tar.bz2 |
Add command to init a book
Diffstat (limited to 'lib/index.js')
-rw-r--r-- | lib/index.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/index.js b/lib/index.js index 0280e30..77bd0a3 100644 --- a/lib/index.js +++ b/lib/index.js @@ -27,7 +27,6 @@ module.exports = { Book: Book, commands: _.flatten([ - // Build command that simply build a book into an output folder { name: "build [book] [output]", description: "build a book", @@ -53,7 +52,6 @@ module.exports = { } }, - // Build an ebook and output it _.map(["pdf", "epub", "mobi"], function(ebookType) { return { name: ebookType+" [book] [output]", @@ -79,7 +77,6 @@ module.exports = { }; }), - // Build and serve a book { name: "serve [book]", description: "Build then serve a gitbook from a directory", @@ -168,7 +165,6 @@ module.exports = { } }, - // Install command that install plugins needed by a book { name: "install [book]", description: "install plugins dependencies", @@ -184,6 +180,14 @@ module.exports = { }); }); } + }, + + { + name: "init [directory]", + description: "create files and folders based on contents of SUMMARY.md", + exec: function(args, kwargs) { + return Book.init(args[0] || process.cwd()); + } } ]) }; |