diff options
author | Samy Pesse <samypesse@gmail.com> | 2016-02-12 21:25:43 +0100 |
---|---|---|
committer | Samy Pesse <samypesse@gmail.com> | 2016-02-12 21:25:43 +0100 |
commit | 0d966fe19738089607de3927694ac5f2bd41f03f (patch) | |
tree | 92d4d3711459249e48dfc708870afff42367a3fc /lib/output/json.js | |
parent | 82f94b010f1d77957c9d1b0967dcdd5eafe73c39 (diff) | |
download | gitbook-0d966fe19738089607de3927694ac5f2bd41f03f.zip gitbook-0d966fe19738089607de3927694ac5f2bd41f03f.tar.gz gitbook-0d966fe19738089607de3927694ac5f2bd41f03f.tar.bz2 |
Separate output in FolderOutput and base
Diffstat (limited to 'lib/output/json.js')
-rw-r--r-- | lib/output/json.js | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/output/json.js b/lib/output/json.js index b03df6e..8cf2373 100644 --- a/lib/output/json.js +++ b/lib/output/json.js @@ -1,18 +1,23 @@ var util = require('util'); -var Output = require('./base'); +var FolderOutput = require('./folder'); var gitbook = require('../gitbook'); function JSONOutput() { - Output.apply(this, arguments); + FolderOutput.apply(this, arguments); } -util.inherits(JSONOutput, Output); +util.inherits(JSONOutput, FolderOutput); + +// Don't copy asset on JSON output +JSONOutput.prototype.onAsset = function(filename) { + +}; // Write a page (parsable file) -JSONOutput.prototype.writePage = function(page) { +JSONOutput.prototype.onPage = function(page) { var that = this; // Parse the page - return page.parse() + return page.parse(this) // Write as json .then(function() { |