Fixing monaco.d.ts generation
This commit is contained in:
parent
9d38f78fb3
commit
4e2e9302d3
|
@ -49,5 +49,9 @@ module.exports = function () {
|
|||
});
|
||||
};
|
||||
|
||||
result.hasErrors = function() {
|
||||
return errors.length > 0;
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
|
@ -340,3 +340,7 @@ function run(out) {
|
|||
};
|
||||
}
|
||||
exports.run = run;
|
||||
function complainErrors() {
|
||||
logErr('Not running monaco.d.ts generation due to compile errors');
|
||||
}
|
||||
exports.complainErrors = complainErrors;
|
||||
|
|
|
@ -399,3 +399,7 @@ export function run(out:string): IMonacoDeclarationResult {
|
|||
isTheSame: currentContent === result
|
||||
};
|
||||
}
|
||||
|
||||
export function complainErrors() {
|
||||
logErr('Not running monaco.d.ts generation due to compile errors');
|
||||
}
|
|
@ -129,6 +129,10 @@ function monacodtsTask(out, isWatch) {
|
|||
clearTimeout(timer);
|
||||
timer = -1;
|
||||
}
|
||||
if (reporter.hasErrors()) {
|
||||
monacodts.complainErrors();
|
||||
return;
|
||||
}
|
||||
var result = monacodts.run(out);
|
||||
if (!result.isTheSame) {
|
||||
if (isWatch) {
|
||||
|
@ -147,7 +151,7 @@ function monacodtsTask(out, isWatch) {
|
|||
|
||||
var resultStream = es.through(function(data) {
|
||||
var filePath = path.normalize(data.path);
|
||||
if (filesToWatchMap[filePath]) {
|
||||
if (isWatch && filesToWatchMap[filePath]) {
|
||||
runSoon(5000);
|
||||
}
|
||||
this.emit('data', data);
|
||||
|
|
Loading…
Reference in a new issue