diff options
Diffstat (limited to 'lib/generators')
-rw-r--r-- | lib/generators/ebook.js | 2 | ||||
-rw-r--r-- | lib/generators/website.js | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/generators/ebook.js b/lib/generators/ebook.js index 0bad35a..cff9ef6 100644 --- a/lib/generators/ebook.js +++ b/lib/generators/ebook.js @@ -18,7 +18,7 @@ var Generator = function(book, format) { this.namespace = "ebook"; // Styles to use - this.styles = _.compact(["ebook", this.ebookFormat]); + this.styles = _.compact(["print", "ebook", this.ebookFormat]); // Convert images (svg -> png) this.convertImages = true; diff --git a/lib/generators/website.js b/lib/generators/website.js index 8d1a3c5..de833d3 100644 --- a/lib/generators/website.js +++ b/lib/generators/website.js @@ -50,12 +50,13 @@ Generator.prototype.prepareStyles = function() { this.styles = _.chain(this.styles) .map(function(style) { var stylePath = that.options.styles[style]; - if (fs.existsSync(path.resolve(that.book.root, stylePath))) { - return stylePath; + if (stylePath && fs.existsSync(path.resolve(that.book.root, stylePath))) { + return [style, stylePath]; } return null; }) .compact() + .object() .value(); return Q(); |