feat: improve grunt restart/rebuild speed

This commit is contained in:
Barış Soner Uşaklı
2020-05-19 21:15:51 -04:00
parent 2a00b0e973
commit cb662e15ce
8 changed files with 169 additions and 198 deletions

View File

@@ -118,6 +118,15 @@ function addProcessHandlers() {
require('./meta').js.killMinifier();
shutdown(1);
});
process.on('message', function (msg) {
if (msg && msg.compiling === 'tpl') {
const benchpressjs = require('benchpressjs');
benchpressjs.flush();
} else if (msg && msg.compiling === 'lang') {
const translator = require('./translator');
translator.flush();
}
});
}
function restart() {