diff options
author | Samy Pessé <samypesse@gmail.com> | 2014-05-21 00:09:40 +0200 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2014-05-21 00:09:40 +0200 |
commit | 75464574d74b5a4398cbea7db774e04ca115c4a7 (patch) | |
tree | 7c55748d7d7bb0a90da49160201d3500d423afff | |
parent | 86f05c68c581968d3f650e5df1c972d13a43268f (diff) | |
download | gitbook-75464574d74b5a4398cbea7db774e04ca115c4a7.zip gitbook-75464574d74b5a4398cbea7db774e04ca115c4a7.tar.gz gitbook-75464574d74b5a4398cbea7db774e04ca115c4a7.tar.bz2 |
For multi-langs, run build one by one
-rw-r--r-- | lib/generate/index.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/generate/index.js b/lib/generate/index.js index 359708b..8c6450c 100644 --- a/lib/generate/index.js +++ b/lib/generate/index.js @@ -135,14 +135,14 @@ var generateMultiLang = function(options) { options.langsSummary = parse.langs(langsSummary); // Generated a book for each valid entry - return Q.all( - _.map(options.langsSummary.list, function(entry) { + return _.reduce(options.langsSummary.list, function(prev, entry) { + return prev.then(function() { return generate(_.extend({}, options, { input: path.join(options.input, entry.path), output: path.join(options.output, entry.path) })); }) - ); + }, Q()); }) .then(function() { |