From 1dfebad790d9e4b9ad938bd8824cabd231f56f7d Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Tue, 7 May 2013 22:14:47 -0700 Subject: [PATCH] Add a space before `define` in the minified files so Dojo builder will detect it properly. Former-commit-id: 3c656ba3b2dd4771eab97c259840c2f426e2454c --- build/post-compile.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build/post-compile.js b/build/post-compile.js index 2d1da80be..0ee398d7f 100644 --- a/build/post-compile.js +++ b/build/post-compile.js @@ -44,6 +44,11 @@ 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 if (source) { source = source.replace(/[\s;]*?(\s*\/\/.*\s*|\s*\/\*[^*]*\*+(?:[^\/][^*]*\*+)*\/\s*)*$/, ';$1');