diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-01-19 17:32:59 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-01-19 17:32:59 +0100 |
commit | 2dbf9b0d4a88a6461ca60f49f3d66ccd42143be3 (patch) | |
tree | 136b4674ef40a301a3c39cb23297cf969086d425 /lib/generator.js | |
parent | be4d2679a4daf885a470b5f89e8e6488b0c7a820 (diff) | |
download | gitbook-2dbf9b0d4a88a6461ca60f49f3d66ccd42143be3.zip gitbook-2dbf9b0d4a88a6461ca60f49f3d66ccd42143be3.tar.gz gitbook-2dbf9b0d4a88a6461ca60f49f3d66ccd42143be3.tar.bz2 |
Start adapting json generator
Diffstat (limited to 'lib/generator.js')
-rw-r--r-- | lib/generator.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/generator.js b/lib/generator.js index d0db3b6..32ce3b5 100644 --- a/lib/generator.js +++ b/lib/generator.js @@ -46,16 +46,16 @@ BaseGenerator.prototype.copyCover = function() { var that = this; return Q.all([ - fs.copy(path.join(this.options.input, "cover.jpg"), path.join(this.options.output, "cover.jpg")), - fs.copy(path.join(this.options.input, "cover_small.jpg"), path.join(this.options.output, "cover_small.jpg")) + fs.copy(path.join(this.book.root, "cover.jpg"), path.join(this.options.output, "cover.jpg")), + fs.copy(path.join(this.book.root, "cover_small.jpg"), path.join(this.options.output, "cover_small.jpg")) ]) .fail(function() { - // If orignally from multi-lang, try copy from originalInput - if (!that.options.originalInput) return; + // If orignaly from multi-lang, try copy from parent + if (!that.isMultilingual()) return; return Q.all([ - fs.copy(path.join(that.options.originalInput, "cover.jpg"), path.join(that.options.output, "cover.jpg")), - fs.copy(path.join(that.options.originalInput, "cover_small.jpg"), path.join(that.options.output, "cover_small.jpg")) + fs.copy(path.join(that.book.parentRoot(), "cover.jpg"), path.join(that.options.output, "cover.jpg")), + fs.copy(path.join(that.book.parentRoot(), "cover_small.jpg"), path.join(that.options.output, "cover_small.jpg")) ]); }) .fail(function(err) { |