From 18b8a63a3c654b1ef784908202841cdfe50d318f Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Fri, 22 Sep 2017 00:38:03 +0300 Subject: [PATCH] chore(doc-gen): fix script paths in plnkr for examples with deps Closes #16238 --- docs/config/services/deployments/production.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/docs/config/services/deployments/production.js b/docs/config/services/deployments/production.js index 9188d964ac83..7a8cace0d53e 100644 --- a/docs/config/services/deployments/production.js +++ b/docs/config/services/deployments/production.js @@ -7,24 +7,25 @@ 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 during the same time -// as the docs app. -var examplesCdnUrl = versionInfo.currentVersion.isSnapshot ? - (angularCodeUrl + 'snapshot') : - (angularCodeUrl + (versionInfo.currentVersion.version || versionInfo.currentVersion.version)); +// 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 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: [examplesCdnUrl + '/angular.min.js'] + scripts: [examplesDependencyPath + 'angular.min.js'] }, - dependencyPath: examplesCdnUrl + dependencyPath: examplesDependencyPath }, scripts: [ cdnUrl + '/angular.min.js',