diff options
Diffstat (limited to 'lib/output/base.js')
-rw-r--r-- | lib/output/base.js | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/output/base.js b/lib/output/base.js index 853fa30..8142761 100644 --- a/lib/output/base.js +++ b/lib/output/base.js @@ -3,6 +3,7 @@ var Ignore = require('ignore'); var Promise = require('../utils/promise'); var PluginsManager = require('../plugins'); +var TemplateEngine = require('../template'); /* Output is like a stream interface for a parsed book @@ -11,15 +12,18 @@ to output "something". The process is mostly on the behavior of "onPage" and "onAsset" */ -function Output(book, type) { +function Output(book) { _.bindAll(this); this.book = book; this.log = this.book.log; - this.type = type; + // Create plugins manager this.plugins = new PluginsManager(book); + // Create template engine + this.template = new TemplateEngine(this); + // Files to ignore in output this.ignore = Ignore(); this.ignore.addPattern(_.compact([ @@ -130,6 +134,11 @@ Output.prototype.onOutputImage = function(page, imgFile) { return page.relative(imgFile); }; +// By default don;t resolve conrefs +Output.prototype.onResolveTemplate = function(from, to) { + +}; + // Finish the generation Output.prototype.finish = function() { |