mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 01:57:50 +00:00
Update minifiers, fix new Closure Compiler issue, and re-minify builds.
Former-commit-id: fb9993cb39c5c43d430e038253ab717ceb4c705f
This commit is contained in:
@@ -23,10 +23,10 @@
|
||||
path.sep || (path.sep = process.platform == 'win32' ? '\\' : '/');
|
||||
|
||||
/** The Git object ID of `closure-compiler.tar.gz` */
|
||||
var closureId = '23cf67d0f0b979d97631fc108a2a43bb82225994';
|
||||
var closureId = 'a95a8007892aa824ce90c6aa3d3abb0489bf0fff';
|
||||
|
||||
/** The Git object ID of `uglifyjs.tar.gz` */
|
||||
var uglifyId = 'e28c7df12b160865f9be9fd24ffda31b2d60b079';
|
||||
var uglifyId = '548bf495606eb4046c4573b1107f0225e274e1e1';
|
||||
|
||||
/** The path of the directory that is the base of the repository */
|
||||
var basePath = fs.realpathSync(path.join(__dirname, '..'));
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user