summaryrefslogtreecommitdiffstats
path: root/lib/generators/website.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-06-02 11:00:22 +0200
committerSamy Pessé <samypesse@gmail.com>2015-06-02 11:00:22 +0200
commita9a230dfc31d9d5092adda51344b0c9f725d9788 (patch)
treee9b864c6c0e08d37afce0df70b1a9bffdb3f94a9 /lib/generators/website.js
parent13fb949d6818bc47a2215ee788c392fa38e1e1d6 (diff)
parent6d53e5277100fe6a9372dea4ab9d70c769a28176 (diff)
downloadgitbook-a9a230dfc31d9d5092adda51344b0c9f725d9788.zip
gitbook-a9a230dfc31d9d5092adda51344b0c9f725d9788.tar.gz
gitbook-a9a230dfc31d9d5092adda51344b0c9f725d9788.tar.bz2
Merge pull request #781 from GitbookIO/fix/775
Fix #775: add optional print.css style
Diffstat (limited to 'lib/generators/website.js')
-rw-r--r--lib/generators/website.js5
1 files changed, 3 insertions, 2 deletions
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();