mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-13 12:27:49 +00:00
Fix argument juggling.
This commit is contained in:
@@ -9,9 +9,12 @@ var uglifyOptions = require('./uglify.options.js');
|
|||||||
/*----------------------------------------------------------------------------*/
|
/*----------------------------------------------------------------------------*/
|
||||||
|
|
||||||
function minify(inpath, outpath, callback, options) {
|
function minify(inpath, outpath, callback, options) {
|
||||||
if (typeof outpath == 'function') {
|
if (_.isFunction(outpath)) {
|
||||||
|
if (_.isObject(callback)) {
|
||||||
|
options = callback;
|
||||||
|
}
|
||||||
|
callback = outpath;
|
||||||
outpath = undefined;
|
outpath = undefined;
|
||||||
callback = options;
|
|
||||||
}
|
}
|
||||||
if (!outpath) {
|
if (!outpath) {
|
||||||
outpath = inpath.replace(/(?=\.js$)/, '.min');
|
outpath = inpath.replace(/(?=\.js$)/, '.min');
|
||||||
|
|||||||
Reference in New Issue
Block a user