Use less memory to build translation files (#6070)

* Change languages build to use less memory

Add graceful-fs so no ned to worry about fs limits

* Specify encoding for fs.readFile

Use eachLimit since graceful-fs handles that now
This commit is contained in:
Peter Jaszkowiak
2017-11-16 15:43:52 -07:00
committed by Barış Soner Uşaklı
parent f5385e38bf
commit c47c47f7e3
17 changed files with 142 additions and 158 deletions

View File

@@ -120,9 +120,7 @@ image.size = function (path, callback) {
};
image.convertImageToBase64 = function (path, callback) {
fs.readFile(path, function (err, data) {
callback(err, data ? data.toString('base64') : null);
});
fs.readFile(path, 'base64', callback);
};
image.mimeFromBase64 = function (imageData) {