This repository was archived by the owner on Apr 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed
docs/config/services/deployments Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change 1
1
'use strict' ;
2
2
3
3
var versionInfo = require ( '../../../../lib/versions/version-info' ) ;
4
- var cdnUrl = '//ajax.googleapis.com/ajax/libs/angularjs/' + versionInfo . cdnVersion ;
4
+
5
+ var googleCdnUrl = '//ajax.googleapis.com/ajax/libs/angularjs/' ;
6
+ var angularCodeUrl = '//code.angularjs.org/' ;
7
+
8
+ var cdnUrl = googleCdnUrl + versionInfo . cdnVersion ;
9
+
10
+ // The plnkr examples must use the code.angularjs.org repo for the snapshot,
11
+ // and the cdn for the tagged version and, if the build is not tagged, the currentVersion.
12
+ //
13
+ // The currentVersion may not be available on the cdn (e.g. if built locally, or hasn't been pushed
14
+ // yet). This will lead to a 404, but this is preferable to loading a version with which the example
15
+ // might not work (possibly in subtle ways).
16
+ var examplesCdnUrl = versionInfo . isSnapshot ?
17
+ ( angularCodeUrl + 'snapshot' ) :
18
+ ( googleCdnUrl + ( versionInfo . version || versionInfo . currentVersion ) ) ;
5
19
6
20
module . exports = function productionDeployment ( getVersion ) {
7
21
return {
8
22
name : 'production' ,
9
23
examples : {
10
24
commonFiles : {
11
- scripts : [ cdnUrl + '/angular.min.js' ]
25
+ scripts : [ examplesCdnUrl + '/angular.min.js' ]
12
26
} ,
13
- dependencyPath : cdnUrl + '/'
27
+ dependencyPath : examplesCdnUrl + '/'
14
28
} ,
15
29
scripts : [
16
30
cdnUrl + '/angular.min.js' ,
You can’t perform that action at this time.
0 commit comments