Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
jquery
Commits
bfac0c70
Commit
bfac0c70
authored
Jan 07, 2015
by
Dave Methvin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Release: Remove copying of jquery-latest files
Closes gh-1942 (cherry picked from commit
16fcc5e9
)
parent
e8ef663a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
28 deletions
+18
-28
release.js
build/release.js
+18
-28
No files found.
build/release.js
View file @
bfac0c70
...
@@ -13,13 +13,7 @@ module.exports = function( Release ) {
...
@@ -13,13 +13,7 @@ module.exports = function( Release ) {
releaseFiles
=
{
releaseFiles
=
{
"jquery-VER.js"
:
devFile
,
"jquery-VER.js"
:
devFile
,
"jquery-VER.min.js"
:
minFile
,
"jquery-VER.min.js"
:
minFile
,
"jquery-VER.min.map"
:
mapFile
,
"jquery-VER.min.map"
:
mapFile
"jquery.js"
:
devFile
,
"jquery.min.js"
:
minFile
,
"jquery.min.map"
:
mapFile
,
"jquery-latest.js"
:
devFile
,
"jquery-latest.min.js"
:
minFile
,
"jquery-latest.min.map"
:
mapFile
},
},
googleFilesCDN
=
[
googleFilesCDN
=
[
...
@@ -44,27 +38,23 @@ module.exports = function( Release ) {
...
@@ -44,27 +38,23 @@ module.exports = function( Release ) {
unpathedFile
=
key
.
replace
(
/VER/g
,
Release
.
newVersion
),
unpathedFile
=
key
.
replace
(
/VER/g
,
Release
.
newVersion
),
releaseFile
=
cdnFolder
+
"/"
+
unpathedFile
;
releaseFile
=
cdnFolder
+
"/"
+
unpathedFile
;
// Beta releases don't update the jquery-latest etc. copies
if
(
/
\.
map$/
.
test
(
releaseFile
)
)
{
if
(
!
Release
.
preRelease
||
key
.
indexOf
(
"VER"
)
>=
0
)
{
// Map files need to reference the new uncompressed name;
// assume that all files reside in the same directory.
if
(
/
\.
map$/
.
test
(
releaseFile
)
)
{
// "file":"jquery.min.js","sources":["jquery.js"]
// Map files need to reference the new uncompressed name;
text
=
fs
.
readFileSync
(
builtFile
,
"utf8"
)
// assume that all files reside in the same directory.
.
replace
(
/"file":"
([^
"
]
+
)
","sources":
\[
"
([^
"
]
+
)
"
\]
/
,
// "file":"jquery.min.js","sources":["jquery.js"]
"
\"
file
\"
:
\"
"
+
unpathedFile
.
replace
(
/
\.
min
\.
map/
,
".min.js"
)
+
text
=
fs
.
readFileSync
(
builtFile
,
"utf8"
)
"
\"
,
\"
sources
\"
:[
\"
"
+
unpathedFile
.
replace
(
/
\.
min
\.
map/
,
".js"
)
+
"
\"
]"
);
.
replace
(
/"file":"
([^
"
]
+
)
","sources":
\[
"
([^
"
]
+
)
"
\]
/
,
fs
.
writeFileSync
(
releaseFile
,
text
);
"
\"
file
\"
:
\"
"
+
unpathedFile
.
replace
(
/
\.
min
\.
map/
,
".min.js"
)
+
}
else
if
(
/
\.
min
\.
js$/
.
test
(
releaseFile
)
)
{
"
\"
,
\"
sources
\"
:[
\"
"
+
unpathedFile
.
replace
(
/
\.
min
\.
map/
,
".js"
)
+
"
\"
]"
);
// Remove the source map comment; it causes way too many problems.
fs
.
writeFileSync
(
releaseFile
,
text
);
// Keep the map file in case DevTools allow manual association.
}
else
if
(
/
\.
min
\.
js$/
.
test
(
releaseFile
)
)
{
text
=
fs
.
readFileSync
(
builtFile
,
"utf8"
)
// Remove the source map comment; it causes way too many problems.
.
replace
(
/
\/\/
# sourceMappingURL=
\S
+/
,
""
);
// Keep the map file in case DevTools allow manual association.
fs
.
writeFileSync
(
releaseFile
,
text
);
text
=
fs
.
readFileSync
(
builtFile
,
"utf8"
)
}
else
if
(
builtFile
!==
releaseFile
)
{
.
replace
(
/
\/\/
# sourceMappingURL=
\S
+/
,
""
);
shell
.
cp
(
"-f"
,
builtFile
,
releaseFile
);
fs
.
writeFileSync
(
releaseFile
,
text
);
}
else
if
(
builtFile
!==
releaseFile
)
{
shell
.
cp
(
"-f"
,
builtFile
,
releaseFile
);
}
}
}
});
});
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment