Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 18b8a63

Browse files
committed
chore(doc-gen): fix script paths in plnkr for examples with deps
Closes #16238
1 parent 6e78fee commit 18b8a63

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

docs/config/services/deployments/production.js

+9-8
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,25 @@ var angularCodeUrl = '//code.angularjs.org/';
77

88
var cdnUrl = googleCdnUrl + versionInfo.cdnVersion;
99

10-
// The "examplesCdnUrl" here applies to the examples when they are opened in plnkr.co.
10+
// The "examplesDependencyPath" here applies to the examples when they are opened in plnkr.co.
1111
// The embedded examples instead always include the files from the *default* deployment,
1212
// to ensure that the source files are always available.
1313
// The plnkr examples must always use the code.angularjs.org source files.
14-
// We cannot rely on the CDN files here, because they are not deployed during the same time
15-
// as the docs app.
16-
var examplesCdnUrl = versionInfo.currentVersion.isSnapshot ?
17-
(angularCodeUrl + 'snapshot') :
18-
(angularCodeUrl + (versionInfo.currentVersion.version || versionInfo.currentVersion.version));
14+
// We cannot rely on the CDN files here, because they are not deployed by the time
15+
// docs.angularjs.org and code.angularjs.org need them.
16+
var versionPath = versionInfo.currentVersion.isSnapshot ?
17+
'snapshot' :
18+
(versionInfo.currentVersion.version || versionInfo.currentVersion.version);
19+
var examplesDependencyPath = angularCodeUrl + versionPath + '/';
1920

2021
module.exports = function productionDeployment(getVersion) {
2122
return {
2223
name: 'production',
2324
examples: {
2425
commonFiles: {
25-
scripts: [examplesCdnUrl + '/angular.min.js']
26+
scripts: [examplesDependencyPath + 'angular.min.js']
2627
},
27-
dependencyPath: examplesCdnUrl
28+
dependencyPath: examplesDependencyPath
2829
},
2930
scripts: [
3031
cdnUrl + '/angular.min.js',

0 commit comments

Comments
 (0)