build: failsafe

This commit is contained in:
Joao Moreno
2017-02-08 11:06:15 +01:00
parent e593908aa3
commit f2c901c9d8
2 changed files with 11 additions and 2 deletions

View File

@@ -41,7 +41,11 @@ function log() {
var path = _a[1], line = _a[2], column = _a[3], message = _a[4];
return ({ path: path, line: Number.parseInt(line), column: Number.parseInt(column), message: message });
});
fs.writeFileSync(buildLogPath, JSON.stringify(messages));
try {
fs.writeFileSync(buildLogPath, JSON.stringify(messages));
}
catch (err) {
}
util.log("Finished " + util.colors.green('compilation') + " with " + errors.length + " errors after " + util.colors.magenta((new Date().getTime() - startTime) + ' ms'));
}
function createReporter() {

View File

@@ -50,7 +50,12 @@ function log(): void {
.filter(match => !!match)
.map(([, path, line, column, message]) => ({ path, line: Number.parseInt(line), column: Number.parseInt(column), message }));
fs.writeFileSync(buildLogPath, JSON.stringify(messages));
try {
fs.writeFileSync(buildLogPath, JSON.stringify(messages));
} catch (err) {
//noop
}
util.log(`Finished ${util.colors.green('compilation')} with ${errors.length} errors after ${util.colors.magenta((new Date().getTime() - startTime) + ' ms')}`);
}