mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 10:57:49 +00:00
Add a space before define in the minified files so Dojo builder will detect it properly.
Former-commit-id: 3c656ba3b2dd4771eab97c259840c2f426e2454c
This commit is contained in:
@@ -44,6 +44,11 @@
|
|||||||
return (other ? other + ' ' : '') + expression + equality + type;
|
return (other ? other + ' ' : '') + expression + equality + type;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// add a space so `define` is detected by the Dojo builder
|
||||||
|
source = source.replace(/.define\(/, function(match) {
|
||||||
|
return (/^\S/.test(match) ? ' ' : '') + match;
|
||||||
|
});
|
||||||
|
|
||||||
// add trailing semicolon
|
// add trailing semicolon
|
||||||
if (source) {
|
if (source) {
|
||||||
source = source.replace(/[\s;]*?(\s*\/\/.*\s*|\s*\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\/\s*)*$/, ';$1');
|
source = source.replace(/[\s;]*?(\s*\/\/.*\s*|\s*\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\/\s*)*$/, ';$1');
|
||||||
|
|||||||
Reference in New Issue
Block a user