diff options
author | Samy Pessé <samypesse@gmail.com> | 2015-03-14 23:23:28 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2015-03-14 23:23:28 +0100 |
commit | 94485621560152cf197dc8bd603774c46de2f0ef (patch) | |
tree | 189aa8349423187a807dd2c2a4b3639d1a752213 /lib/generators | |
parent | 8320484b88f2481dad276b1912831110fdf75bcd (diff) | |
download | gitbook-94485621560152cf197dc8bd603774c46de2f0ef.zip gitbook-94485621560152cf197dc8bd603774c46de2f0ef.tar.gz gitbook-94485621560152cf197dc8bd603774c46de2f0ef.tar.bz2 |
Add editorconfig and normalize indent
Diffstat (limited to 'lib/generators')
-rw-r--r-- | lib/generators/ebook.js | 2 | ||||
-rw-r--r-- | lib/generators/index.js | 12 | ||||
-rw-r--r-- | lib/generators/website.js | 36 |
3 files changed, 25 insertions, 25 deletions
diff --git a/lib/generators/ebook.js b/lib/generators/ebook.js index 29b1966..0bad35a 100644 --- a/lib/generators/ebook.js +++ b/lib/generators/ebook.js @@ -30,7 +30,7 @@ Generator.prototype.prepareTemplates = function() { this.templates["summary"] = this.book.plugins.template("ebook:summary") || path.resolve(this.options.theme, 'templates/ebook/summary.html'); this.templates["glossary"] = this.book.plugins.template("ebook:glossary") || path.resolve(this.options.theme, 'templates/ebook/glossary.html'); - return Q(); + return Q(); }; // Generate table of contents diff --git a/lib/generators/index.js b/lib/generators/index.js index e619188..068d0d9 100644 --- a/lib/generators/index.js +++ b/lib/generators/index.js @@ -2,10 +2,10 @@ var _ = require("lodash"); var EbookGenerator = require("./ebook"); module.exports = { - json: require("./json"), - website: require("./website"), - ebook: EbookGenerator, - pdf: _.partialRight(EbookGenerator, "pdf"), - mobi: _.partialRight(EbookGenerator, "mobi"), - epub: _.partialRight(EbookGenerator, "epub") + json: require("./json"), + website: require("./website"), + ebook: EbookGenerator, + pdf: _.partialRight(EbookGenerator, "pdf"), + mobi: _.partialRight(EbookGenerator, "mobi"), + epub: _.partialRight(EbookGenerator, "epub") }; diff --git a/lib/generators/website.js b/lib/generators/website.js index a58e3c4..d1e92a0 100644 --- a/lib/generators/website.js +++ b/lib/generators/website.js @@ -64,11 +64,11 @@ Generator.prototype.prepareStyles = function() { // Prepare templates Generator.prototype.prepareTemplates = function() { - this.templates["page"] = this.book.plugins.template("site:page") || path.resolve(this.options.theme, 'templates/website/page.html'); + this.templates["page"] = this.book.plugins.template("site:page") || path.resolve(this.options.theme, 'templates/website/page.html'); this.templates["langs"] = this.book.plugins.template("site:langs") || path.resolve(this.options.theme, 'templates/website/langs.html'); this.templates["glossary"] = this.book.plugins.template("site:glossary") || path.resolve(this.options.theme, 'templates/website/glossary.html'); - return Q(); + return Q(); }; // Prepare template engine @@ -213,38 +213,38 @@ Generator.prototype._writeTemplate = function(tpl, options, output, interpolate) interpolate = interpolate || _.identity; return Q() .then(function(sections) { - return that.env.render( - tpl, - _.extend({ + return that.env.render( + tpl, + _.extend({ gitbook: { version: pkg.version }, - styles: that.styles, + styles: that.styles, - revision: that.revision, + revision: that.revision, - title: that.options.title, - description: that.options.description, + title: that.options.title, + description: that.options.description, language: that.book.config.normalizeLanguage(), - glossary: that.book.glossary, + glossary: that.book.glossary, - summary: that.book.summary, - allNavigation: that.book.navigation, + summary: that.book.summary, + allNavigation: that.book.navigation, - plugins: { + plugins: { resources: that.book.plugins.resources(that.namespace) }, - pluginsConfig: JSON.stringify(that.options.pluginsConfig), - htmlSnippet: _.partial(_.partialRight(that.book.plugins.html, that, options), that.namespace), + pluginsConfig: JSON.stringify(that.options.pluginsConfig), + htmlSnippet: _.partial(_.partialRight(that.book.plugins.html, that, options), that.namespace), - options: that.options, + options: that.options, basePath: ".", staticBase: path.join(".", "gitbook"), - }, options) - ); + }, options) + ); }) .then(interpolate) .then(function(html) { |