aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVojta Jina2012-09-17 16:55:48 -0700
committerIgor Minar2012-11-26 21:33:45 +0100
commitc9199ee6634af6b960524d91bdae706860a49d0c (patch)
treef9edaf8729c42a86681e573d07ef53d03e672328
parent6f18adedef60ddb972a446046270f98c4ac18bb7 (diff)
downloadangular.js-c9199ee6634af6b960524d91bdae706860a49d0c.tar.bz2
docs: load angular from CDN only on production
So that when running the docs locally, eg. during e2e testing, we use the latest build version of angular, rather than the stable one from CDN. This fixes e2e tests running with Testacular.
-rw-r--r--docs/src/templates/index.html4
-rw-r--r--testacular-e2e.conf.js4
2 files changed, 5 insertions, 3 deletions
diff --git a/docs/src/templates/index.html b/docs/src/templates/index.html
index 38b6d97b..625c449b 100644
--- a/docs/src/templates/index.html
+++ b/docs/src/templates/index.html
@@ -22,7 +22,7 @@
baseUrl = location.href.replace(rUrl, indexFile),
jQuery = /index-jq[^\.]*\.html$/.test(baseUrl),
debug = /index[^\.]*-debug\.html$/.test(baseUrl),
- gae = (baseUrl.split('/').length == 4),
+ production = location.hostname === 'docs.angularjs.org',
headEl = document.getElementsByTagName('head')[0],
sync = true,
angularVersion = {
@@ -45,7 +45,7 @@
addTag('script', {src: 'docs-keywords.js'}, sync);
function path(name) {
- if (gae) {
+ if (production) {
if (name.match(/^angular(-\w+)?\.js/) && !name.match(/bootstrap/)) {
name = '//ajax.googleapis.com/ajax/libs/angularjs/' +
angularVersion.stable +
diff --git a/testacular-e2e.conf.js b/testacular-e2e.conf.js
index d84dd689..07c79c70 100644
--- a/testacular-e2e.conf.js
+++ b/testacular-e2e.conf.js
@@ -6,9 +6,11 @@ autoWatch = false;
singleRun = true;
logLevel = LOG_INFO;
logColors = true;
-browsers = ['Chrome']
+browsers = ['Chrome'];
proxies = {
+ // angular.js, angular-resource.js, etc
+ '/angular': 'http://localhost:8000/build/angular',
'/': 'http://localhost:8000/build/docs/'
};