summaryrefslogtreecommitdiffstats
path: root/lib/cli
diff options
context:
space:
mode:
Diffstat (limited to 'lib/cli')
-rw-r--r--lib/cli/index.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/cli/index.js b/lib/cli/index.js
index 4d3d364..f1aca5e 100644
--- a/lib/cli/index.js
+++ b/lib/cli/index.js
@@ -7,6 +7,7 @@ var tinylr = require('tiny-lr');
var Promise = require('../utils/promise');
var PluginsManager = require('../plugins');
var Book = require('../book');
+var initBook = require('../init');
var helper = require('./helper');
var Server = require('./server');
@@ -14,6 +15,17 @@ var watch = require('./watch');
module.exports = {
commands: [
+ {
+ name: 'init [book]',
+ description: 'setup and create files for chapters',
+ options: [
+ helper.options.log
+ ],
+ exec: function(args) {
+ var input = path.resolve(args[0] || process.cwd());
+ return Book.init(helper.nodeFS, input);
+ }
+ },
{
name: 'parse [book]',