summaryrefslogtreecommitdiffstats
path: root/lib/generate/page/index.js
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2015-01-19 09:47:36 +0100
committerSamy Pessé <samypesse@gmail.com>2015-01-19 09:47:36 +0100
commitec586dd3cdf06e9567f5d3e4961022ddc3c94778 (patch)
treecc7825ab73110b4e6fbedee404427b052edffa17 /lib/generate/page/index.js
parent80432161708357bdcf0e00533d9e6d327636dab6 (diff)
downloadgitbook-ec586dd3cdf06e9567f5d3e4961022ddc3c94778.zip
gitbook-ec586dd3cdf06e9567f5d3e4961022ddc3c94778.tar.gz
gitbook-ec586dd3cdf06e9567f5d3e4961022ddc3c94778.tar.bz2
Clear folder
Diffstat (limited to 'lib/generate/page/index.js')
-rw-r--r--lib/generate/page/index.js84
1 files changed, 0 insertions, 84 deletions
diff --git a/lib/generate/page/index.js b/lib/generate/page/index.js
deleted file mode 100644
index 8054fe6..0000000
--- a/lib/generate/page/index.js
+++ /dev/null
@@ -1,84 +0,0 @@
-var _ = require("lodash");
-var util = require("util");
-var path = require("path");
-var Q = require("q");
-var swig = require("../template");
-
-var fs = require("../fs");
-var parse = require("../../parse");
-var BaseGenerator = require("../site");
-
-var Generator = function() {
- BaseGenerator.apply(this, arguments);
-
- // Styles to use
- this.styles = ["ebook"];
-
- // Base for assets in plugins
- this.pluginAssetsBase = "ebook";
-
- // List of pages content
- this.pages = {};
-};
-util.inherits(Generator, BaseGenerator);
-
-Generator.prototype.loadTemplates = function() {
- this.template = swig.compileFile(
- this.plugins.template("ebook:page") || path.resolve(this.options.theme, 'templates/ebook/page.html')
- );
- this.summaryTemplate = swig.compileFile(
- this.plugins.template("ebook:sumary") || path.resolve(this.options.theme, 'templates/ebook/summary.html')
- );
- this.glossaryTemplate = swig.compileFile(
- this.plugins.template("ebook:glossary") || path.resolve(this.options.theme, 'templates/ebook/glossary.html')
- );
-};
-
-// Generate table of contents
-Generator.prototype.writeToc = function() {
- var that = this;
- var basePath = ".";
-
- return this._writeTemplate(this.summaryTemplate, {
- toc: parse.progress(this.options.navigation, "README.md").chapters,
- basePath: basePath,
- staticBase: path.join(basePath, "gitbook"),
- }, path.join(this.options.output, "SUMMARY.html"));
-};
-
-Generator.prototype.finish = function() {
- var that = this;
- var basePath = ".";
- var output = path.join(this.options.output, "index.html");
-
- var progress = parse.progress(this.options.navigation, "README.md");
-
- return Q()
-
- // Write table of contents
- .then(function() {
- return that.writeToc();
- })
-
- // Write glossary
- .then(function() {
- return that.writeGlossary();
- })
-
- // Copy cover
- .then(function() {
- return that.copyCover();
- })
-
- // Copy assets
- .then(function() {
- return that.copyAssets();
- });
-};
-
-// Generate languages index
-Generator.prototype.langsIndex = function(langs) {
- return Q();
-};
-
-module.exports = Generator;