mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-16 15:45:13 +00:00
Improve logs for plugins installation
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user