summaryrefslogtreecommitdiffstats
path: root/lib/generator.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-01-21 19:51:35 +0100
committerSamy Pessé <samypesse@gmail.com>2015-01-21 19:51:35 +0100
commit3d8db17bc35d22ae514805ded1a4dd12ae968b60 (patch)
treeb35bdd95dc73824e00838d64aaea8c96cafbd2b4 /lib/generator.js
parent3c605ea8099bcba58d8eeb0435d87c563d434e46 (diff)
downloadgitbook-3d8db17bc35d22ae514805ded1a4dd12ae968b60.zip
gitbook-3d8db17bc35d22ae514805ded1a4dd12ae968b60.tar.gz
gitbook-3d8db17bc35d22ae514805ded1a4dd12ae968b60.tar.bz2
Copy theme assets to output
Diffstat (limited to 'lib/generator.js')
-rw-r--r--lib/generator.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/generator.js b/lib/generator.js
index f495d8d..a16af16 100644
--- a/lib/generator.js
+++ b/lib/generator.js
@@ -16,6 +16,8 @@ var BaseGenerator = function(book) {
// Base for assets in plugins
this.pluginAssetsBase = "book";
+
+ _.bindAll(this);
};
BaseGenerator.prototype.callHook = function(name, data) {
@@ -61,8 +63,8 @@ BaseGenerator.prototype.copyCover = function() {
var that = this;
return Q.all([
- 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"))
+ fs.copy(path.join(that.book.root, "cover.jpg"), path.join(that.options.output, "cover.jpg")),
+ fs.copy(path.join(that.book.root, "cover_small.jpg"), path.join(that.options.output, "cover_small.jpg"))
])
.fail(function() {
// If orignaly from multi-lang, try copy from parent