More build fixes.

Former-commit-id: 8b97cd56c4b5530d03ba89d192be7df989e96655
This commit is contained in:
John-David Dalton
2013-01-20 12:02:47 -08:00
parent 6c965e0223
commit 82049096e6
5 changed files with 63 additions and 49 deletions

View File

@@ -120,8 +120,7 @@
source = fs.readFileSync(filePath, 'utf8');
}
modes = options.modes || (options.modes = modes);
modes = options.modes || modes;
if (options.isMapped) {
modes = modes.filter(function(mode) {
return mode != 'hybrid';
@@ -129,9 +128,11 @@
}
if (options.isTemplate) {
modes = modes.filter(function(mode) {
mode != 'advanced';
return mode != 'advanced';
});
}
options.modes = modes;
// fetch the Closure Compiler
getDependency({
'id': 'closure-compiler',
@@ -450,7 +451,7 @@
if (this.modes.indexOf('advanced') > -1) {
closureCompile.call(this, this.source, 'advanced', onClosureAdvancedCompile.bind(this));
} else {
onComplete.call(this);
onClosureAdvancedGzip.call(this);
}
}

View File

@@ -28,7 +28,7 @@
source = source.replace(/^\/\**[\s\S]+?\*\/\n/, '');
// move vars exposed by the Closure Compiler into the IIFE
source = source.replace(/^((?:(['"])use strict\2;)?(?:var (?:[a-z]+=(?:!0|!1|null)[,;])+)?)([\s\S]*?function[^)]+\){)/, '$3$1');
source = source.replace(/^((?:var (?:\w+=(?:!0|!1|null)[,;])+)?)([\s\S]*?function[^)]+\){)/, '$2$1');
// correct overly aggressive Closure Compiler advanced optimizations
source = source