Skip to content

Commit c34ed46

Browse files
committed
Release: Remove copying of jquery-latest files
1 parent 83b038f commit c34ed46

File tree

1 file changed

+18
-29
lines changed

1 file changed

+18
-29
lines changed

build/release.js

+18-29
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,7 @@ module.exports = function( Release ) {
1414
releaseFiles = {
1515
"jquery-VER.js": devFile,
1616
"jquery-VER.min.js": minFile,
17-
"jquery-VER.min.map": mapFile //,
18-
// Disable these until 2.0 defeats 1.9 as the ONE TRUE JQUERY
19-
// "jquery.js": devFile,
20-
// "jquery.min.js": minFile,
21-
// "jquery.min.map": mapFile,
22-
// "jquery-latest.js": devFile,
23-
// "jquery-latest.min.js": minFile,
24-
// "jquery-latest.min.map": mapFile
17+
"jquery-VER.min.map": mapFile
2518
},
2619

2720
googleFilesCDN = [
@@ -46,27 +39,23 @@ module.exports = function( Release ) {
4639
unpathedFile = key.replace( /VER/g, Release.newVersion ),
4740
releaseFile = cdnFolder + "/" + unpathedFile;
4841

49-
// Beta releases don't update the jquery-latest etc. copies
50-
if ( !Release.preRelease || key.indexOf( "VER" ) >= 0 ) {
51-
52-
if ( /\.map$/.test( releaseFile ) ) {
53-
// Map files need to reference the new uncompressed name;
54-
// assume that all files reside in the same directory.
55-
// "file":"jquery.min.js","sources":["jquery.js"]
56-
text = fs.readFileSync( builtFile, "utf8" )
57-
.replace( /"file":"([^"]+)","sources":\["([^"]+)"\]/,
58-
"\"file\":\"" + unpathedFile.replace( /\.min\.map/, ".min.js" ) +
59-
"\",\"sources\":[\"" + unpathedFile.replace( /\.min\.map/, ".js" ) + "\"]" );
60-
fs.writeFileSync( releaseFile, text );
61-
} else if ( /\.min\.js$/.test( releaseFile ) ) {
62-
// Remove the source map comment; it causes way too many problems.
63-
// Keep the map file in case DevTools allow manual association.
64-
text = fs.readFileSync( builtFile, "utf8" )
65-
.replace( /\/\/# sourceMappingURL=\S+/, "" );
66-
fs.writeFileSync( releaseFile, text );
67-
} else if ( builtFile !== releaseFile ) {
68-
shell.cp( "-f", builtFile, releaseFile );
69-
}
42+
if ( /\.map$/.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( /"file":"([^"]+)","sources":\["([^"]+)"\]/,
48+
"\"file\":\"" + unpathedFile.replace( /\.min\.map/, ".min.js" ) +
49+
"\",\"sources\":[\"" + unpathedFile.replace( /\.min\.map/, ".js" ) + "\"]" );
50+
fs.writeFileSync( releaseFile, text );
51+
} else if ( /\.min\.js$/.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( /\/\/# sourceMappingURL=\S+/, "" );
56+
fs.writeFileSync( releaseFile, text );
57+
} else if ( builtFile !== releaseFile ) {
58+
shell.cp( "-f", builtFile, releaseFile );
7059
}
7160
});
7261
}

0 commit comments

Comments
 (0)