revert: chore(docs-app): load example files based on active deployment

This reverts commit d91a6bdbc6.

The runnable examples cannot rely on the CDN for loading the common files,
because the CDN push does not happen at the same time as the docs are generated,
which means the doc examples are non-functional for an unforeseeable time.
This commit is contained in:
Martin Staffa
2017-08-20 15:44:01 +02:00
committed by Martin Staffa
parent 6d2ff0ac6d
commit 48f0957dde
9 changed files with 3 additions and 34 deletions
-1
View File
@@ -14,7 +14,6 @@ angular.module('docsApp', [
'search',
'tutorials',
'versions',
'deployment',
'ui.bootstrap.dropdown'
])
+1 -7
View File
@@ -18,13 +18,7 @@ angular.module('examples', [])
return {
restrict: 'C',
scope : true,
controller : ['$scope', 'DEPLOYMENT', function($scope, DEPLOYMENT) {
var exampleIndexFile = (DEPLOYMENT === 'default' ? 'index' : 'index-' + DEPLOYMENT) + '.html';
$scope.getExampleIndex = function(basePath) {
return basePath + '/' + exampleIndexFile;
};
controller : ['$scope', function($scope) {
$scope.setTab = function(index) {
var tab = $scope.tabs[index];
$scope.activeTabIndex = index;
+1 -11
View File
@@ -112,10 +112,6 @@ module.exports = new Package('angularjs', [
docTypes: ['indexPage'],
pathTemplate: '.',
outputPathTemplate: '${id}.html'
}, {
docTypes: ['deploymentData'],
pathTemplate: '.',
outputPathTemplate: 'js/${id}.js'
});
computePathsProcessor.pathTemplates.push({
@@ -129,14 +125,8 @@ module.exports = new Package('angularjs', [
outputPathTemplate: 'partials/${area}/${moduleName}/${groupType}.html'
});
computePathsProcessor.pathTemplates.push({
docTypes: ['example'],
pathTemplate: 'examples/${example.id}',
outputPathTemplate: 'examples/${example.id}/index${deploymentQualifier}.html'
});
computeIdsProcessor.idTemplates.push({
docTypes: ['overview', 'tutorial', 'e2e-test', 'indexPage', 'deploymentData'],
docTypes: ['overview', 'tutorial', 'e2e-test', 'indexPage'],
getId: function(doc) { return doc.fileInfo.baseName; },
getAliases: function(doc) { return [doc.id]; }
});
-10
View File
@@ -35,17 +35,7 @@ module.exports = function generateIndexPagesProcessor() {
indexDoc.id = 'index' + (deployment.name === 'default' ? '' : '-' + deployment.name);
var deploymentDoc = {
docType: 'deploymentData',
id: 'deployment-data-' + deployment.name,
template: 'angular-service.template.js',
ngModuleName: 'deployment',
serviceName: 'DEPLOYMENT',
serviceValue: deployment.name
};
docs.push(indexDoc);
docs.push(deploymentDoc);
});
}
};
@@ -26,7 +26,6 @@ module.exports = function debugDeployment(getVersion) {
'js/all-versions-data.js',
'js/pages-data.js',
'js/nav-data.js',
'js/deployment-data-debug.js',
'js/docs.js'
],
stylesheets: [
@@ -26,7 +26,6 @@ module.exports = function defaultDeployment(getVersion) {
'js/all-versions-data.js',
'js/pages-data.js',
'js/nav-data.js',
'js/deployment-data-default.js',
'js/docs.min.js'
],
stylesheets: [
-1
View File
@@ -30,7 +30,6 @@ module.exports = function jqueryDeployment(getVersion) {
'js/all-versions-data.js',
'js/pages-data.js',
'js/nav-data.js',
'js/deployment-data-jquery.js',
'js/docs.min.js'
],
stylesheets: [
@@ -43,7 +43,6 @@ module.exports = function productionDeployment(getVersion) {
'https://code.angularjs.org/snapshot/docs/js/all-versions-data.js',
'js/pages-data.js',
'js/nav-data.js',
'js/deployment-data-production.js',
'js/docs.min.js'
],
stylesheets: [
@@ -18,7 +18,7 @@
</div>
{% endfor %}
<iframe class="runnable-example-frame" ng-src="{{getExampleIndex('{$ doc.example.deployments.default.path $}')}}" name="{$ doc.example.id $}"></iframe>
<iframe class="runnable-example-frame" src="{$ doc.example.deployments.default.outputPath $}" name="{$ doc.example.id $}"></iframe>
</div>
</div>