kopia lustrzana https://github.com/c9/core
fix removeLicenceComments breaking packaged file
rodzic
a11af58899
commit
68046d4445
|
@ -346,8 +346,11 @@ function removeUseStrict(module) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function removeLicenceComments(module) {
|
function removeLicenceComments(module) {
|
||||||
if (/\.(js|jsx|css|less)/.test(module.path))
|
if (/\.(js|jsx|css|less)/.test(module.path)) {
|
||||||
module.source = module.source.replace(/(?:(;)|\n|^)\s*\/\*[\d\D]*?\*\/|(\n|^)\s*\/\/.*/g, "$1");
|
module.source = module.source.replace(/(\n|;|^|,)(?:[ \t]*(?:\/\*(?:[^*]|[*](?![/]))*?\*\/|\/\/.*\n))+(\n?)/gm, function(match, $1, $2) {
|
||||||
|
return $1 == $2 ? $1 : $1 + $2;
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
function removeLicenceCommentsKeepLines(module) {
|
function removeLicenceCommentsKeepLines(module) {
|
||||||
if (/\.(js|jsx|css|less)/.test(module.path)) {
|
if (/\.(js|jsx|css|less)/.test(module.path)) {
|
||||||
|
|
Ładowanie…
Reference in New Issue