Update minifiers, fix new Closure Compiler issue, and re-minify builds.

Former-commit-id: fb9993cb39c5c43d430e038253ab717ceb4c705f
This commit is contained in:
John-David Dalton
2013-03-05 00:21:41 -08:00
parent 36207c9a98
commit ff312a15dd
5 changed files with 112 additions and 106 deletions

View File

@@ -30,7 +30,13 @@
// correct overly aggressive Closure Compiler advanced optimizations
source = source
.replace(/prototype\s*=\s*{\s*valueOf\s*:\s*1\s*}/, 'prototype={valueOf:1,y:1}')
.replace(/(document[^&]+&&)\s*(?:\w+|!\d)/, '$1!({toString:0}+"")');
.replace(/(document[^&]+&&)\s*(?:\w+|!\d)/, '$1!({toString:0}+"")')
source = source.replace(/(\w+\.prototype\s*=\s*)(\w+)(?=\.prototype;)/, function(match, left, funcName) {
return RegExp('\\b(function ' + funcName + '|' + funcName + '=function)\\(').test(source)
? match
: left + /\w+(?=\.VERSION)/.exec(source);
});
// flip `typeof` expressions to help optimize Safari and
// correct the AMD module definition for AMD build optimizers