From 19401280aed9d4767faddcf58fab91ec13c556a9 Mon Sep 17 00:00:00 2001 From: Di Peng Date: Sat, 20 Aug 2011 08:51:00 -0700 Subject: feat(doc): generate both normal and debug version of index.html - index.html has manifest file and angular.min.js - index-jq.html has manifest file, angular.min.js and jquery.min.js - index-debug.html has angular.js - index-jq-debug.html has angular.js and jquery.min.js --- docs/src/gen-docs.js | 29 ++++++++++++++++++++++++----- docs/src/templates/index.html | 4 ++-- docs/src/writer.js | 29 ++++++++++++++++++++++++----- 3 files changed, 50 insertions(+), 12 deletions(-) (limited to 'docs/src') diff --git a/docs/src/gen-docs.js b/docs/src/gen-docs.js index 4649bec3..93d0038e 100755 --- a/docs/src/gen-docs.js +++ b/docs/src/gen-docs.js @@ -42,11 +42,30 @@ function writeTheRest(writesFuture) { writesFuture.push(writer.copyDir('img')); writesFuture.push(writer.copyDir('examples')); - writesFuture.push(writer.copyTpl('index.html')); - writesFuture.push(writer.copy('docs/src/templates/index.html', - 'build/docs/index-jq.html', - '', - '', + ngMin = '', + ng = '' + + writesFuture.push(writer.copy('docs/src/templates/index.html', 'build/docs/index.html', + writer.replace, {'doc:manifest': manifest, + '': ngMin})); + + writesFuture.push(writer.copy('docs/src/templates/index.html', 'build/docs/index-jq.html', + writer.replace, {'doc:manifest': manifest, + '': ngMin, + '': jq})); + + writesFuture.push(writer.copy('docs/src/templates/index.html', 'build/docs/index-debug.html', + writer.replace, {'doc:manifest': '', + '': ng})); + + writesFuture.push(writer.copy('docs/src/templates/index.html', 'build/docs/index-jq-debug.html', + writer.replace, {'doc:manifest': '', + '': ng, + '': jq})); + writesFuture.push(writer.copyTpl('offline.html')); writesFuture.push(writer.copyTpl('docs-scenario.html')); writesFuture.push(writer.copyTpl('jquery.min.js')); diff --git a/docs/src/templates/index.html b/docs/src/templates/index.html index 26c1eaec..d5cfaed2 100644 --- a/docs/src/templates/index.html +++ b/docs/src/templates/index.html @@ -2,7 +2,7 @@ + doc:manifest>