summaryrefslogtreecommitdiffstats
path: root/lib/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/index.js')
-rw-r--r--lib/index.js12
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());
+ }
}
])
};