Add utf8 encoding to the generated minified file in minify.js.

Former-commit-id: 2765e28a177ae2703d3b1a6328a35cf5c92fa6ef
This commit is contained in:
John-David Dalton
2012-07-11 05:54:19 -04:00
parent d1407b3bd0
commit 60ed65a73a

View File

@@ -332,7 +332,7 @@
else {
// 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
// the same file
// `<filename>.min.js`
(function() {
var filePath = process.argv[2],
dirPath = path.dirname(filePath),
@@ -340,7 +340,7 @@
workingName = path.basename(filePath, '.js') + '.min';
minify(source, workingName, function(result) {
fs.writeFileSync(path.join(dirPath, workingName + '.js'), result);
fs.writeFileSync(path.join(dirPath, workingName + '.js'), result, 'utf8');
});
}());
}