summaryrefslogtreecommitdiffstats
path: root/lib/generators
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2016-01-28 23:42:00 +0100
committerSamy Pessé <samypesse@gmail.com>2016-01-28 23:42:00 +0100
commite83d63c2aa5e30c26ada888990b263e6b786d3f6 (patch)
treeaf460422630bfbaa9016c51d5ec384fa3923d01d /lib/generators
parentff30ba62ba694658d1575b0cf3a0fbf3d5e00d62 (diff)
downloadgitbook-e83d63c2aa5e30c26ada888990b263e6b786d3f6.zip
gitbook-e83d63c2aa5e30c26ada888990b263e6b786d3f6.tar.gz
gitbook-e83d63c2aa5e30c26ada888990b263e6b786d3f6.tar.bz2
Index page of summary when parsing
Diffstat (limited to 'lib/generators')
-rw-r--r--lib/generators/json.js2
-rw-r--r--lib/generators/website.js27
2 files changed, 28 insertions, 1 deletions
diff --git a/lib/generators/json.js b/lib/generators/json.js
index 19182bc..d2c6954 100644
--- a/lib/generators/json.js
+++ b/lib/generators/json.js
@@ -7,7 +7,7 @@ function JSONGenerator() {
util.inherits(JSONGenerator, Generator);
// Write a page (parsable file)
-Generator.prototype.writePage = function(page) {
+JSONGenerator.prototype.writePage = function(page) {
var json = {};
diff --git a/lib/generators/website.js b/lib/generators/website.js
new file mode 100644
index 0000000..a2c3311
--- /dev/null
+++ b/lib/generators/website.js
@@ -0,0 +1,27 @@
+var util = require('util');
+var Generator = require('./base');
+
+function WebsiteGenerator() {
+ Generator.apply(this, arguments);
+}
+util.inherits(WebsiteGenerator, Generator);
+
+// Copy an asset file
+WebsiteGenerator.prototype.writeAsset = function(filename) {
+ var that = this;
+
+ return that.book.readFile(filename)
+ .then(function(buf) {
+ return that.output.writeFile(filename, buf);
+ });
+};
+
+// Write a page (parsable file)
+WebsiteGenerator.prototype.writePage = function(page) {
+
+};
+
+
+
+
+module.exports = WebsiteGenerator;