mirror of
https://github.com/linuxserver/core.git
synced 2026-02-20 05:07:19 +08:00
allow whitespace after define(
This commit is contained in:
parent
70194ede7f
commit
1de84e810d
8
node_modules/architect-build/module-deps.js
generated
vendored
8
node_modules/architect-build/module-deps.js
generated
vendored
@ -279,7 +279,7 @@ function getReqDeps(src, name) {
|
||||
});
|
||||
}
|
||||
function getAmdDeps(src, name) {
|
||||
var m = src.match(/define\(\[[^\]]+\]/gm);
|
||||
var m = src.match(/define\(\s*\[[^\]]+\]/gm);
|
||||
if (!m)
|
||||
return [];
|
||||
|
||||
@ -360,12 +360,12 @@ function removeLicenceCommentsKeepLines(module) {
|
||||
function wrapUMD(module) {
|
||||
if (module.loaderModule || module.noRequire)
|
||||
return;
|
||||
var firstDefineCall = module.source.match(/define\([^)]*/);
|
||||
var firstDefineCall = module.source.match(/define\(\s*[^)]*/);
|
||||
if (firstDefineCall) {
|
||||
// check if it is a normal define or some crazy umd trick
|
||||
if (/define\(function\s*\(/.test(firstDefineCall[0]))
|
||||
if (/define\(\s*function\s*\(/.test(firstDefineCall[0]))
|
||||
return;
|
||||
if (/define\(\[[^\]]*\],\s*function\(/.test(firstDefineCall[0]))
|
||||
if (/define\(\s*\[[^\]]*\],\s*function\(/.test(firstDefineCall[0]))
|
||||
return;
|
||||
}
|
||||
console.log("wrapping module " + module.id);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user