mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-16 22:10:25 +00:00
Updated AMD stripping regexp
This commit is contained in:
parent
cf04068eba
commit
aa1a3cdf49
1 changed files with 4 additions and 3 deletions
|
|
@ -8812,10 +8812,11 @@ function (lang, logger, file, parse, optimize, pragma,
|
|||
//Added for jQuery Mobile build as we are only interested in the dependency resolution
|
||||
currContents = currContents
|
||||
//.replace(/\brequire\(\s*[^\]]*].*function\(\s*\)\s*\{[^}]*\}\)\W*/, "") // Get rid of the require block
|
||||
.replace(/^\[[^\]]+\]\s*,?[);]*\s*function.*\{/m, "(function( $, undefined ) {")
|
||||
.replace(/\);?\s*$/, "( jQuery ));");
|
||||
.replace(/^(:?\[[^\]]*\]\s*,\s*)?[);]*\s*function.*\{/m, "(function() {")
|
||||
.replace(/\);?\s*$/, "());");
|
||||
|
||||
currContents = currContents.replace(/\s*\(function\(.*\)\s*\{\s*\}\([^)]*\)\);/, "") // Get rid of empty functions
|
||||
currContents = currContents.replace(/\s*\(function\(.*\)\s*\{\s*\}\([^)]*\)\);/, ""); // Get rid of empty functions
|
||||
currContents = currContents.replace(/\s*\(function\(.*\)\s*\{\s*require\([^\)]*\);?\s*\}\([^)]*\)\);?/, ""); // Get rid of require( [init] ) function
|
||||
|
||||
//Semicolon is for files that are not well formed when
|
||||
//concatenated with other content.
|
||||
|
|
|
|||
Loading…
Reference in a new issue