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

chore(doc-gen): fix script paths in plnkr for examples with deps #16238

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions docs/config/services/deployments/production.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,23 @@ var angularCodeUrl = '//code.angularjs.org/';

var cdnUrl = googleCdnUrl + versionInfo.cdnVersion;

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

module.exports = function productionDeployment(getVersion) {
return {
name: 'production',
examples: {
commonFiles: {
scripts: [examplesDependencyPath + '/angular.min.js']
scripts: [examplesDependencyPath + 'angular.min.js']
},
dependencyPath: examplesDependencyPath
},
Expand Down