mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 03:17:49 +00:00
Ensure uglify options are set correctly.
This commit is contained in:
@@ -19,7 +19,7 @@ function minify(inpath, outpath, callback, options) {
|
|||||||
if (!outpath) {
|
if (!outpath) {
|
||||||
outpath = inpath.replace(/(?=\.js$)/, '.min');
|
outpath = inpath.replace(/(?=\.js$)/, '.min');
|
||||||
}
|
}
|
||||||
var output = uglify.minify(inpath, _.defaults(options, uglifyOptions));
|
var output = uglify.minify(inpath, _.defaults(options || {}, uglifyOptions));
|
||||||
fs.writeFile(outpath, output.code, 'utf-8', callback);
|
fs.writeFile(outpath, output.code, 'utf-8', callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user