diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-01-23 14:10:45 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-01-23 14:10:45 +0100 |
commit | df16f3d90dc79366dd5cb30a6a91aa480397833f (patch) | |
tree | 5fce1ebb6655615bd091babeda04714ea2e6a823 /lib/generators/ebook.js | |
parent | ccd2f6ecdc17f796ff434ed89e63df4e3bee8434 (diff) | |
download | gitbook-df16f3d90dc79366dd5cb30a6a91aa480397833f.zip gitbook-df16f3d90dc79366dd5cb30a6a91aa480397833f.tar.gz gitbook-df16f3d90dc79366dd5cb30a6a91aa480397833f.tar.bz2 |
Test ebook generation instead of pdf output
Diffstat (limited to 'lib/generators/ebook.js')
-rw-r--r-- | lib/generators/ebook.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/generators/ebook.js b/lib/generators/ebook.js index fa5dcbd..b173c19 100644 --- a/lib/generators/ebook.js +++ b/lib/generators/ebook.js @@ -12,10 +12,10 @@ var Generator = function(book, format) { BaseGenerator.apply(this, arguments); // eBook format - this.ebookFormat = format || "pdf"; + this.ebookFormat = format; // Styles to use - this.styles = ["ebook", this.ebookFormat]; + this.styles = _.compact(["ebook", this.ebookFormat]); }; util.inherits(Generator, BaseGenerator); @@ -47,6 +47,8 @@ Generator.prototype.finish = function() { return that.writeSummary(); }) .then(function() { + if (!that.ebookFormat) return Q(); + var d = Q.defer(); if (!that.options.cover && fs.existsSync(path.join(that.options.output, "cover.jpg"))) { |