mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 09:27:49 +00:00
Add utf8 encoding to the generated minified file in minify.js.
Former-commit-id: 2765e28a177ae2703d3b1a6328a35cf5c92fa6ef
This commit is contained in:
@@ -332,7 +332,7 @@
|
|||||||
else {
|
else {
|
||||||
// read the Lo-Dash source file from the first argument if the script
|
// read the Lo-Dash source file from the first argument if the script
|
||||||
// was invoked directly (e.g. `node minify.js source.js`) and write to
|
// was invoked directly (e.g. `node minify.js source.js`) and write to
|
||||||
// the same file
|
// `<filename>.min.js`
|
||||||
(function() {
|
(function() {
|
||||||
var filePath = process.argv[2],
|
var filePath = process.argv[2],
|
||||||
dirPath = path.dirname(filePath),
|
dirPath = path.dirname(filePath),
|
||||||
@@ -340,7 +340,7 @@
|
|||||||
workingName = path.basename(filePath, '.js') + '.min';
|
workingName = path.basename(filePath, '.js') + '.min';
|
||||||
|
|
||||||
minify(source, workingName, function(result) {
|
minify(source, workingName, function(result) {
|
||||||
fs.writeFileSync(path.join(dirPath, workingName + '.js'), result);
|
fs.writeFileSync(path.join(dirPath, workingName + '.js'), result, 'utf8');
|
||||||
});
|
});
|
||||||
}());
|
}());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user