diff options
Diffstat (limited to 'lib/generate/site/index.js')
-rw-r--r-- | lib/generate/site/index.js | 35 |
1 files changed, 2 insertions, 33 deletions
diff --git a/lib/generate/site/index.js b/lib/generate/site/index.js index 73765ae..6f29991 100644 --- a/lib/generate/site/index.js +++ b/lib/generate/site/index.js @@ -9,7 +9,6 @@ var parse = require("../../parse"); var BaseGenerator = require("../generator"); var links = require("../../utils/links"); var indexer = require('./search_indexer'); -var Manifest = require('../manifest'); @@ -21,10 +20,6 @@ var Generator = function() { this.revision = Date.now(); this.indexer = indexer(); - this.manifest = new Manifest(Date.now()); - this.manifest.add("NETWORK", [ - '*' - ]); }; util.inherits(Generator, BaseGenerator); @@ -144,8 +139,6 @@ Generator.prototype.convertFile = function(content, _input) { return _callHook("page"); }) .then(function() { - that.manifest.add("CACHE", _output); - return that._writeTemplate(that.template, { progress: page.progress, @@ -189,22 +182,12 @@ Generator.prototype.copyAssets = function() { path.join(that.options.output, "gitbook") ) - // Add to cache manifest - .then(function() { - return that.manifest.addFolder(path.join(that.options.output, "gitbook"), "gitbook"); - }) - // Copy plugins assets .then(function() { return Q.all( _.map(that.plugins.list, function(plugin) { var pluginAssets = path.join(that.options.output, "gitbook/plugins/", plugin.name); - return plugin.copyAssets(pluginAssets) - .then(function(copiedStuff) { - // Nothing was copied - if(!copiedStuff) { return; } - return that.manifest.addFolder(pluginAssets, "gitbook/plugins/"+plugin.name); - }); + return plugin.copyAssets(pluginAssets); }) ); }); @@ -219,24 +202,10 @@ Generator.prototype.writeSearchIndex = function() { }; -// Add cache manifest -Generator.prototype.writeCacheManifest = function() { - return fs.writeFile( - path.join(this.options.output, 'manifest.appcache'), - this.manifest.dump() - ); -}; - Generator.prototype.finish = function() { - var deferred = this.copyAssets() + return this.copyAssets() .then(this.copyCover) .then(this.writeSearchIndex); - - if (this.options.cache !== false) { - deferred = deferred.then(this.writeCacheManifest); - } - - return deferred; }; module.exports = Generator; |