mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-18 03:31:03 +01:00
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:
committed by
Barış Soner Uşaklı
parent
f5385e38bf
commit
c47c47f7e3
@@ -45,16 +45,16 @@ function renderEmail(req, res, next) {
|
||||
|
||||
async.waterfall([
|
||||
function (next) {
|
||||
fs.readFile(email, next);
|
||||
fs.readFile(email, 'utf8', next);
|
||||
},
|
||||
function (original, next) {
|
||||
var text = meta.config['email:custom:' + path] ? meta.config['email:custom:' + path] : original.toString();
|
||||
var text = meta.config['email:custom:' + path] ? meta.config['email:custom:' + path] : original;
|
||||
|
||||
next(null, {
|
||||
path: path,
|
||||
fullpath: email,
|
||||
text: text,
|
||||
original: original.toString(),
|
||||
original: original,
|
||||
});
|
||||
},
|
||||
], next);
|
||||
|
||||
Reference in New Issue
Block a user