mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 10:57:49 +00:00
Skip {hybrid} advanced compilation for templates.
Former-commit-id: d76ed99ba7d906812b24a751b56d3a8a6b955203
This commit is contained in:
@@ -270,7 +270,13 @@
|
|||||||
this.compiled.simple.gzip = result;
|
this.compiled.simple.gzip = result;
|
||||||
|
|
||||||
// next, compile the source using advanced optimizations
|
// next, compile the source using advanced optimizations
|
||||||
closureCompile.call(this, this.source, 'advanced', onClosureAdvancedCompile.bind(this));
|
if (this.isTemplate) {
|
||||||
|
// jump directly to UglifyJS for templates.
|
||||||
|
uglify.call(this, this.source, onUglify.bind(this));
|
||||||
|
} else {
|
||||||
|
// otherwise, compress using advanced optimizations
|
||||||
|
closureCompile.call(this, this.source, 'advanced', onClosureAdvancedCompile.bind(this));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onClosureAdvancedCompile(exception, result) {
|
function onClosureAdvancedCompile(exception, result) {
|
||||||
@@ -389,7 +395,16 @@
|
|||||||
this.hybrid.simple.gzip = result;
|
this.hybrid.simple.gzip = result;
|
||||||
|
|
||||||
var message = 'Compressing ' + path.basename(this.outputPath, '.js') + ' using hybrid minification; `ADVANCED_OPTIMIZATIONS`...';
|
var message = 'Compressing ' + path.basename(this.outputPath, '.js') + ' using hybrid minification; `ADVANCED_OPTIMIZATIONS`...';
|
||||||
uglify.call(this, this.compiled.advanced.source, message, onAdvancedHybrid.bind(this));
|
if (this.isTemplate) {
|
||||||
|
this.compiled.advanced = this.hybrid.advanced = {
|
||||||
|
'gzip': {
|
||||||
|
'length': Infinity
|
||||||
|
}
|
||||||
|
};
|
||||||
|
onComplete.call(this);
|
||||||
|
} else {
|
||||||
|
uglify.call(this, this.compiled.advanced.source, message, onAdvancedHybrid.bind(this));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user