mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-17 23:40:23 +00:00
Short summary: if you use local node server everything should work as before, if you use GAE, everything should work now as well, but we pull assets from CDN. - GAE doesn't support ':' in filenames, so I had to replace it with '_' but only in the filename, all servers were reconfigured to rewrite the urls from : to _ when doing file lookup - We now pull angular assets from google CDN when deployed on GAE (locally or in production). When running on a non GAE server we pull assets from ../ directory as before - Since only certain versions of Angular are available on CDN and we want to be able to autodeploy docs, I had to pin down the Angular files to a "stable" version when running on GAE
45 lines
1.1 KiB
HTML
45 lines
1.1 KiB
HTML
<!DOCTYPE HTML>
|
|
<html xmlns:ng="http://angularjs.org">
|
|
<head>
|
|
<title>AngularJS Docs E2E Test Runner</title>
|
|
<script>
|
|
var gae = (location.pathname.split('/').length == 2),
|
|
headEl = document.head,
|
|
angularVersion = {
|
|
current: '"NG_VERSION_FULL"', // rewrite during build
|
|
stable: '"NG_VERSION_STABLE"'
|
|
};
|
|
|
|
addTag('script', {src: path('angular-scenario.js')}, function() {
|
|
addTag('script', {src: 'docs-scenario.js'}, function() {
|
|
angular.scenario.setUpAndRun();
|
|
});
|
|
});
|
|
|
|
function addTag(name, attributes, callback) {
|
|
var el = document.createElement(name),
|
|
attrName;
|
|
|
|
for (attrName in attributes) {
|
|
el.setAttribute(attrName, attributes[attrName]);
|
|
}
|
|
|
|
if (callback) {
|
|
el.onload = callback;
|
|
}
|
|
|
|
headEl.appendChild(el);
|
|
}
|
|
|
|
|
|
function path(name) {
|
|
return gae
|
|
? 'http://code.angularjs.org/' + angularVersion.stable + '/' +
|
|
name.replace(/\.js$/, '-' + angularVersion.stable + '.js')
|
|
: '../' + name;
|
|
}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
</body>
|
|
</html>
|