diff options
author | Samy Pessé <samypesse@gmail.com> | 2014-08-08 18:35:43 -0700 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2014-08-11 07:36:45 -0700 |
commit | d914eae40a9730d76295750ac47ebed9fe4f7146 (patch) | |
tree | ca85886ff5fc64968a8abfe55aa86174a0574310 /lib/generate/site/index.js | |
parent | 74f95f4d0d404e6df533d056a5acab60623407c8 (diff) | |
download | gitbook-d914eae40a9730d76295750ac47ebed9fe4f7146.zip gitbook-d914eae40a9730d76295750ac47ebed9fe4f7146.tar.gz gitbook-d914eae40a9730d76295750ac47ebed9fe4f7146.tar.bz2 |
Remove html5 cache manifest
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; |