summaryrefslogtreecommitdiffstats
path: root/lib/output/json/onPage.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/output/json/onPage.js')
-rw-r--r--lib/output/json/onPage.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/output/json/onPage.js b/lib/output/json/onPage.js
index 54179c6..c2ee0d0 100644
--- a/lib/output/json/onPage.js
+++ b/lib/output/json/onPage.js
@@ -4,6 +4,8 @@ var Modifiers = require('../modifiers');
var writeFile = require('../helper/writeFile');
var getModifiers = require('../getModifiers');
+var JSON_VERSION = '3';
+
/**
Write a page as a json file
@@ -18,6 +20,12 @@ function onPage(output, page) {
// Generate the JSON
var json = JSONUtils.encodeBookWithPage(output.getBook(), resultPage);
+ // Delete some private properties
+ delete json.config;
+
+ // Specify JSON output version
+ json.version = JSON_VERSION;
+
// File path in the output folder
var filePath = PathUtils.setExtension(file.getPath(), '.json');