summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-01-26 11:57:28 +0100
committerSamy Pessé <samypesse@gmail.com>2015-01-26 11:57:28 +0100
commitf70c29fea5ce935213683c2f3de952d8a164df4e (patch)
tree055919276c56413f0d12a1de84646d14d349a049
parentdecd8dbdc50c41be2c3394019ece146e4ccfb507 (diff)
downloadgitbook-f70c29fea5ce935213683c2f3de952d8a164df4e.zip
gitbook-f70c29fea5ce935213683c2f3de952d8a164df4e.tar.gz
gitbook-f70c29fea5ce935213683c2f3de952d8a164df4e.tar.bz2
Improve logs for plugins installation
-rw-r--r--README.md4
-rw-r--r--lib/configuration.js7
2 files changed, 9 insertions, 2 deletions
diff --git a/README.md b/README.md
index 04c77e1..08427b6 100644
--- a/README.md
+++ b/README.md
@@ -45,6 +45,10 @@ $ gitbook build ./repository ./outputFolder
* [Variables and Templating](#variables-and-templating)
* [Content References](#content-references)
* [Plugins](#plugins)
+* Interractive reader website:
+ * Search
+ * Font Settings (Serif, Sans Serif)
+ * Themes: white, sepia, night
## Output Formats
diff --git a/lib/configuration.js b/lib/configuration.js
index 375833b..1c2bddf 100644
--- a/lib/configuration.js
+++ b/lib/configuration.js
@@ -129,11 +129,11 @@ Configuration.prototype.installPlugins = function(options) {
});
// Install plugins one by one
- if (options.log) console.log(plugins.length+" plugins to install");
+ if (options.log) that.book.log.info.ln(plugins.length+" plugins to install");
return _.reduce(plugins, function(prev, plugin) {
return prev.then(function() {
var fullname = "gitbook-plugin-"+plugin.name;
- if (options.log) console.log("Install plugin", plugin.name, "from npm ("+fullname+") with version", (plugin.version || "*"));
+ if (options.log) that.book.log.info.ln("install plugin", plugin.name, "from npm ("+fullname+") with version", (plugin.version || "*"));
return Q.nfcall(npmi, {
'name': fullname,
'version': plugin.version,
@@ -143,6 +143,9 @@ Configuration.prototype.installPlugins = function(options) {
'loaded': false,
'prefix': that.book.root
}
+ })
+ .then(function() {
+ that.book.log.info.ok("plugin", plugin.name, "installed with success");
});
});
}, Q());