From 60ed65a73a4bd710040ebc7c85b00a2397c0f28a Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Wed, 11 Jul 2012 05:54:19 -0400 Subject: [PATCH] Add `utf8` encoding to the generated minified file in minify.js. Former-commit-id: 2765e28a177ae2703d3b1a6328a35cf5c92fa6ef --- build/minify.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/minify.js b/build/minify.js index 95f691311..29e355d33 100755 --- a/build/minify.js +++ b/build/minify.js @@ -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 + // `.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'); }); }()); }