diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-01-25 11:55:33 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-01-25 11:55:33 +0100 |
commit | fd701fc37ce9698efec53183f0b29b334f8520aa (patch) | |
tree | f78f04e79a7fa50c39867058826cba683638f1f3 /lib/index.js | |
parent | 4d38baf7a2b8739df1adf4eb1d45d33f42219a28 (diff) | |
download | gitbook-fd701fc37ce9698efec53183f0b29b334f8520aa.zip gitbook-fd701fc37ce9698efec53183f0b29b334f8520aa.tar.gz gitbook-fd701fc37ce9698efec53183f0b29b334f8520aa.tar.bz2 |
Add color to output
Diffstat (limited to 'lib/index.js')
-rw-r--r-- | lib/index.js | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/index.js b/lib/index.js index 77bd0a3..f32cea9 100644 --- a/lib/index.js +++ b/lib/index.js @@ -2,6 +2,7 @@ var Q = require("q"); var _ = require("lodash"); var path = require("path"); var tinylr = require('tiny-lr-fork'); +var color = require('bash-color'); var Book = require("./book"); var Plugin = require("./plugin"); @@ -48,6 +49,10 @@ module.exports = { return book.parse() .then(function() { return book.generate(kwargs.format); + }) + .then(function(){ + console.log(""); + console.log(color.green("Done, without error")); }); } }, @@ -72,6 +77,10 @@ module.exports = { return book.generateFile(output, { ebookFormat: ebookType }); + }) + .then(function(){ + console.log(""); + console.log(color.green("Done, without error")); }); } }; @@ -178,6 +187,10 @@ module.exports = { return book.config.installPlugins({ log: true }); + }) + .then(function(){ + console.log(""); + console.log(color.green("Done, without error")); }); } }, @@ -186,7 +199,11 @@ 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()); + return Book.init(args[0] || process.cwd()) + .then(function(){ + console.log(""); + console.log(color.green("Done, without error")); + }); } } ]) |