Add versioning to monaco.d.ts generation

This commit is contained in:
Alex Dima
2018-10-24 12:09:05 +02:00
parent 27f64e395f
commit baf8b88b1d
6 changed files with 124 additions and 21 deletions

View File

@@ -189,7 +189,12 @@ class MonacoGenerator {
// Nothing changed
return null;
}
return monacodts.run2('src', this._dtsFilesContents2);
let r = monacodts.run2('src', this._dtsFilesContents2);
if (!r && !this._isWatch) {
// The build must always be able to generate the monaco.d.ts
throw new Error(`monaco.d.ts genration error - Cannot continue`);
}
return r;
}
_log(message, ...rest) {
util2.log(util2.colors.cyan('[monaco.d.ts]'), message, ...rest);