mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-16 15:45:13 +00:00
Add color to output
This commit is contained in:
+18
-1
@@ -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"));
|
||||
});
|
||||
}
|
||||
}
|
||||
])
|
||||
|
||||
+2
-1
@@ -26,7 +26,8 @@
|
||||
"send": "0.2.0",
|
||||
"tiny-lr-fork": "0.0.5",
|
||||
"tmp": "0.0.24",
|
||||
"crc": "3.2.1"
|
||||
"crc": "3.2.1",
|
||||
"bash-color": "0.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"mocha": "1.18.2",
|
||||
|
||||
Reference in New Issue
Block a user