@@ -14,13 +14,7 @@ module.exports = function( Release ) {
14
14
releaseFiles = {
15
15
"jquery-VER.js" : devFile ,
16
16
"jquery-VER.min.js" : minFile ,
17
- "jquery-VER.min.map" : mapFile ,
18
- "jquery.js" : devFile ,
19
- "jquery.min.js" : minFile ,
20
- "jquery.min.map" : mapFile ,
21
- "jquery-latest.js" : devFile ,
22
- "jquery-latest.min.js" : minFile ,
23
- "jquery-latest.min.map" : mapFile
17
+ "jquery-VER.min.map" : mapFile
24
18
} ,
25
19
26
20
googleFilesCDN = [
@@ -45,27 +39,23 @@ module.exports = function( Release ) {
45
39
unpathedFile = key . replace ( / V E R / g, Release . newVersion ) ,
46
40
releaseFile = cdnFolder + "/" + unpathedFile ;
47
41
48
- // Beta releases don't update the jquery-latest etc. copies
49
- if ( ! Release . preRelease || key . indexOf ( "VER" ) >= 0 ) {
50
-
51
- if ( / \. m a p $ / . test ( releaseFile ) ) {
52
- // Map files need to reference the new uncompressed name;
53
- // assume that all files reside in the same directory.
54
- // "file":"jquery.min.js","sources":["jquery.js"]
55
- text = fs . readFileSync ( builtFile , "utf8" )
56
- . replace ( / " f i l e " : " ( [ ^ " ] + ) " , " s o u r c e s " : \[ " ( [ ^ " ] + ) " \] / ,
57
- "\"file\":\"" + unpathedFile . replace ( / \. m i n \. m a p / , ".min.js" ) +
58
- "\",\"sources\":[\"" + unpathedFile . replace ( / \. m i n \. m a p / , ".js" ) + "\"]" ) ;
59
- fs . writeFileSync ( releaseFile , text ) ;
60
- } else if ( / \. m i n \. j s $ / . test ( releaseFile ) ) {
61
- // Remove the source map comment; it causes way too many problems.
62
- // Keep the map file in case DevTools allow manual association.
63
- text = fs . readFileSync ( builtFile , "utf8" )
64
- . replace ( / \/ \/ # s o u r c e M a p p i n g U R L = \S + / , "" ) ;
65
- fs . writeFileSync ( releaseFile , text ) ;
66
- } else if ( builtFile !== releaseFile ) {
67
- shell . cp ( "-f" , builtFile , releaseFile ) ;
68
- }
42
+ if ( / \. m a p $ / . test ( releaseFile ) ) {
43
+ // Map files need to reference the new uncompressed name;
44
+ // assume that all files reside in the same directory.
45
+ // "file":"jquery.min.js","sources":["jquery.js"]
46
+ text = fs . readFileSync ( builtFile , "utf8" )
47
+ . replace ( / " f i l e " : " ( [ ^ " ] + ) " , " s o u r c e s " : \[ " ( [ ^ " ] + ) " \] / ,
48
+ "\"file\":\"" + unpathedFile . replace ( / \. m i n \. m a p / , ".min.js" ) +
49
+ "\",\"sources\":[\"" + unpathedFile . replace ( / \. m i n \. m a p / , ".js" ) + "\"]" ) ;
50
+ fs . writeFileSync ( releaseFile , text ) ;
51
+ } else if ( / \. m i n \. j s $ / . test ( releaseFile ) ) {
52
+ // Remove the source map comment; it causes way too many problems.
53
+ // Keep the map file in case DevTools allow manual association.
54
+ text = fs . readFileSync ( builtFile , "utf8" )
55
+ . replace ( / \/ \/ # s o u r c e M a p p i n g U R L = \S + / , "" ) ;
56
+ fs . writeFileSync ( releaseFile , text ) ;
57
+ } else if ( builtFile !== releaseFile ) {
58
+ shell . cp ( "-f" , builtFile , releaseFile ) ;
69
59
}
70
60
} ) ;
71
61
}
0 commit comments