diff options
| author | Peter Bacon Darwin | 2014-02-12 22:47:42 +0000 |
|---|---|---|
| committer | Peter Bacon Darwin | 2014-02-16 19:03:41 +0000 |
| commit | 389d4879da4aa620ee95d789b19ff9be44eb730a (patch) | |
| tree | 93352ddc8738a975904a1774d51b93d585ca1075 /docs/src/appCache.js | |
| parent | a564160511bf1bbed5a4fe5d2981fae1bb664eca (diff) | |
| download | angular.js-389d4879da4aa620ee95d789b19ff9be44eb730a.tar.bz2 | |
chore(doc-gen): new docs
chore(doc-gen): implement dgeni
Diffstat (limited to 'docs/src/appCache.js')
| -rw-r--r-- | docs/src/appCache.js | 76 |
1 files changed, 0 insertions, 76 deletions
diff --git a/docs/src/appCache.js b/docs/src/appCache.js deleted file mode 100644 index 1a816eb8..00000000 --- a/docs/src/appCache.js +++ /dev/null @@ -1,76 +0,0 @@ -/** -* Generate appCache Manifest file here -*/ - -exports.appCache = appCache; -var fs = require('q-io/fs'); -var Q = require('qq'); -function identity($) {return $;} - -function appCache(path) { - if(!path) { - return appCacheTemplate(); - } - var blackList = ["build/docs/offline.html", - "build/docs/sitemap.xml", - "build/docs/robots.txt", - "build/docs/docs-scenario.html", - "build/docs/docs-scenario.js", - "build/docs/appcache.manifest", - "build/docs/.htaccess" - ]; - - var result = ["CACHE MANIFEST", - "# " + new Date().toISOString(), - "", - "# cache all of these", - "CACHE:", - "../angular.min.js"]; - - var resultPostfix = ["", - "FALLBACK:", - "/ /build/docs/index.html", - "", - "# allow access to google analytics and twitter when we are online", - "NETWORK:", - "*"]; - - var promise = fs.listTree(path).then(function(files){ - var fileFutures = []; - files.forEach(function(file){ - fileFutures.push(fs.isFile(file).then(function(isFile){ - if (isFile && blackList.indexOf(file) == -1) { - return file.replace('build/docs/',''); - } - })); - }); - return Q.deep(fileFutures); - }).then(function(files){ - return result.concat(files.filter(identity)).concat(resultPostfix).join('\n'); - }); - - return promise; -} - -function appCacheTemplate() { - return ["CACHE MANIFEST", - "# " + new Date().toISOString(), - "", - "# cache all of these", - "CACHE:", - "syntaxhighlighter/syntaxhighlighter-combined.js", - "../angular.min.js", - "docs-combined.js", - "docs-data.js", - "docs-combined.css", - "syntaxhighlighter/syntaxhighlighter-combined.css", - "img/texture_1.png", - "img/yellow_bkgnd.jpg", - "", - "FALLBACK:", - "/ /build/docs/offline.html", - "", - "# allow access to google analytics and twitter when we are online", - "NETWORK:", - "*"].join('\n'); -} |
