aboutsummaryrefslogtreecommitdiffstats
path: root/docs/src/gen-docs.js
diff options
context:
space:
mode:
authorDi Peng2011-06-24 18:09:59 -0700
committerIgor Minar2011-07-20 17:09:40 -0700
commite90b741c9492a65e159c842afe49383f1868308e (patch)
tree3f0b16574e27ffa4878dab76389a15e9a7f4b477 /docs/src/gen-docs.js
parent3af1e7ca2ee8c2acd69e5bcbb3ffc1bf51239285 (diff)
downloadangular.js-e90b741c9492a65e159c842afe49383f1868308e.tar.bz2
feat(gen-docs): enable caching the whole site
Generate a manifest file automatically by reading the directories.
Diffstat (limited to 'docs/src/gen-docs.js')
-rwxr-xr-xdocs/src/gen-docs.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/src/gen-docs.js b/docs/src/gen-docs.js
index dfdbdf45..8ed0c563 100755
--- a/docs/src/gen-docs.js
+++ b/docs/src/gen-docs.js
@@ -4,7 +4,8 @@ var reader = require('reader.js'),
ngdoc = require('ngdoc.js'),
writer = require('writer.js'),
callback = require('callback.js'),
- SiteMap = require('SiteMap.js').SiteMap;
+ SiteMap = require('SiteMap.js').SiteMap,
+ appCache = require('appCache.js');
var docs = [];
var start;
@@ -31,9 +32,9 @@ var writes = callback.chain(function(){
writer.copy('docs/src/templates/index.html', 'build/docs/index-jq.html', writes.waitFor(),
'<-- jquery place holder -->', '<script src=\"jquery.min.js\"><\/script>');
writer.copyTpl('offline.html', writes.waitFor());
- writer.output('app-cache.manifest',
- appCacheTemplate().replace(/%TIMESTAMP%/, (new Date()).toISOString()),
- writes.waitFor());
+ //writer.output('app-cache.manifest',
+ // appCacheTemplate().replace(/%TIMESTAMP%/, (new Date()).toISOString()),
+ // writes.waitFor());
writer.merge(['docs.js',
'doc_widgets.js'],
'docs-combined.js',
@@ -56,6 +57,7 @@ var writes = callback.chain(function(){
'syntaxhighlighter/syntaxhighlighter-combined.css',
writes.waitFor());
writer.copyTpl('jquery.min.js', writes.waitFor());
+ writer.output('app-cache.manifest', appCache('build/docs/'), writes.waitFor());
});
writes.onDone(function(){
console.log('DONE. Generated ' + docs.length + ' pages in ' +
@@ -80,8 +82,6 @@ function appCacheTemplate() {
"docs-keywords.js",
"docs-combined.css",
"syntaxhighlighter/syntaxhighlighter-combined.css",
- "img/texture_1.png",
- "img/yellow_bkgnd.jpg",
"",
"FALLBACK:",
"/ offline.html",