summaryrefslogtreecommitdiffstats
path: root/lib/generators/ebook.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/generators/ebook.js')
-rw-r--r--lib/generators/ebook.js6
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"))) {