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
dfaee326
Commit
dfaee326
authored
Sep 05, 2013
by
Michał Gołębiowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #13983. Switch to //# for sourcemap directives.
parent
58a50409
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
21 deletions
+3
-21
Gruntfile.js
Gruntfile.js
+2
-4
dist.js
build/tasks/dist.js
+0
-12
uglify.js
build/tasks/uglify.js
+1
-5
No files found.
Gruntfile.js
View file @
dfaee326
...
@@ -85,12 +85,10 @@ module.exports = function( grunt ) {
...
@@ -85,12 +85,10 @@ module.exports = function( grunt ) {
"dist/jquery.pre-min.js"
:
[
"dist/jquery.js"
]
"dist/jquery.pre-min.js"
:
[
"dist/jquery.js"
]
},
},
options
:
{
options
:
{
banner
:
"
\n\n\n\n\n\n\n\n\n\n
"
+
// banner line size must be preserved
banner
:
"
\n\n\n\n\n\n\n\n\n\n
\n\n
"
+
// banner line size must be preserved
"/*! jQuery v<%= pkg.version %> | "
+
"/*! jQuery v<%= pkg.version %> | "
+
"(c) 2005, 2013 jQuery Foundation, Inc. | "
+
"(c) 2005, 2013 jQuery Foundation, Inc. | "
+
"jquery.org/license
\n
"
+
"jquery.org/license */
\n
"
"//@ sourceMappingURL=jquery.min.map
\n
"
+
"*/
\n
"
}
}
}
}
},
},
...
...
build/tasks/dist.js
View file @
dfaee326
...
@@ -57,18 +57,6 @@ module.exports = function( grunt ) {
...
@@ -57,18 +57,6 @@ module.exports = function( grunt ) {
if
(
/
\.
map$/
.
test
(
filename
)
)
{
if
(
/
\.
map$/
.
test
(
filename
)
)
{
text
=
text
.
replace
(
/"dist
\/
/g
,
"
\"
"
);
text
=
text
.
replace
(
/"dist
\/
/g
,
"
\"
"
);
fs
.
writeFileSync
(
filename
,
text
,
"utf-8"
);
fs
.
writeFileSync
(
filename
,
text
,
"utf-8"
);
// Use our hard-coded sourceMap directive instead of the autogenerated one (#13274; #13776)
}
else
if
(
/
\.
min
\.
js$/
.
test
(
filename
)
)
{
i
=
0
;
text
=
text
.
replace
(
/
(?:\/\*
|
)\n?\/\/
@
\s
*sourceMappingURL=.*
(\n\*\/
|
)
/g
,
function
(
match
)
{
if
(
i
++
)
{
return
""
;
}
return
match
;
});
fs
.
writeFileSync
(
filename
,
text
,
"utf-8"
);
}
}
// Optionally copy dist files to other locations
// Optionally copy dist files to other locations
...
...
build/tasks/uglify.js
View file @
dfaee326
...
@@ -38,12 +38,8 @@ module.exports = function( grunt ) {
...
@@ -38,12 +38,8 @@ module.exports = function( grunt ) {
// Rename the file to a temporary name.
// Rename the file to a temporary name.
fs
.
renameSync
(
mapFileName
,
mapping
.
dest
);
fs
.
renameSync
(
mapFileName
,
mapping
.
dest
);
grunt
.
file
.
write
(
mapFileName
,
grunt
.
file
.
read
(
mapping
.
dest
)
grunt
.
file
.
write
(
mapFileName
,
grunt
.
file
.
read
(
mapping
.
dest
)
// The uglify task erroneously prepends dist/ to file names.
.
replace
(
/"dist
\/
/g
,
"
\"
"
)
// Refer to the source jquery.js, not the temporary jquery.pre-min.js.
// Refer to the source jquery.js, not the temporary jquery.pre-min.js.
.
replace
(
/
\.
pre-min
\.
/g
,
"."
)
.
replace
(
/
\.
pre-min
\.
/g
,
"."
));
// There's already a pragma at the beginning of the file, remove the one at the end.
.
replace
(
/
\/\/
@ sourceMappingURL=jquery
\.
min
\.
map$/g
,
""
));
});
});
// Remove temporary files.
// Remove temporary files.
...
...
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