diff options
Diffstat (limited to 'lib/generator.js')
-rw-r--r-- | lib/generator.js | 6 |
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 |