summaryrefslogtreecommitdiffstats
path: root/lib/book.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-02-04 16:54:02 +0100
committerSamy Pessé <samypesse@gmail.com>2015-02-04 16:54:02 +0100
commit234a37726fe895f59f8fc0329ea4d1ebebe92d14 (patch)
tree51ad6b8eb7e087bda2b13af1f8f95315c2b6bc81 /lib/book.js
parent65a7979874054b96a9b5076b7d15479910e2df16 (diff)
downloadgitbook-234a37726fe895f59f8fc0329ea4d1ebebe92d14.zip
gitbook-234a37726fe895f59f8fc0329ea4d1ebebe92d14.tar.gz
gitbook-234a37726fe895f59f8fc0329ea4d1ebebe92d14.tar.bz2
Improve logs for images and ebook copy
Diffstat (limited to 'lib/book.js')
-rw-r--r--lib/book.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/book.js b/lib/book.js
index dc3594b..064b9fc 100644
--- a/lib/book.js
+++ b/lib/book.js
@@ -295,14 +295,11 @@ Book.prototype.generateFile = function(output, options) {
_tmpDir = path.join(_tmpDir, lang);
}
- book.log.info("copy ebook to", output, "...");
+ book.log.info.ln("copy ebook to", _outputFile);
return fs.copy(
path.join(_tmpDir, "index."+options.ebookFormat),
_outputFile
- )
- .then(function() {
- book.log.info.ok();
- });
+ );
};
// Multi-langs book
@@ -313,12 +310,15 @@ Book.prototype.generateFile = function(output, options) {
_.map(book.langs, function(lang) {
return copyFile(lang.lang);
})
- );
+ )
+ .thenResolve(book.langs.length);
} else {
- return copyFile();
+ return copyFile().thenResolve(1);
}
})
- .then(function() {
+ .then(function(n) {
+ book.log.info.ok(n+" file(s) generated");
+
return fs.remove(tmpDir);
});
});