diff options
author | Dirk Baeumer <dirkb@microsoft.com> | 2016-06-24 12:14:41 +0300 |
---|---|---|
committer | Dirk Baeumer <dirkb@microsoft.com> | 2016-06-24 12:15:39 +0300 |
commit | 4e2e9302d397cf7084332d4425d0312d95f31b81 (patch) | |
tree | 2569aa72032b3641247bce6d7b1e822effed5cd4 | |
parent | 9d38f78fb3335cc4e4519947f662cd72cdb51899 (diff) |
Fixing monaco.d.ts generation
-rw-r--r-- | build/lib/reporter.js | 4 | ||||
-rw-r--r-- | build/monaco/api.js | 4 | ||||
-rw-r--r-- | build/monaco/api.ts | 4 | ||||
-rw-r--r-- | gulpfile.js | 6 |
4 files changed, 17 insertions, 1 deletions
diff --git a/build/lib/reporter.js b/build/lib/reporter.js index 69077e9b4a3..e02bf359558 100644 --- a/build/lib/reporter.js +++ b/build/lib/reporter.js @@ -49,5 +49,9 @@ module.exports = function () { }); }; + result.hasErrors = function() { + return errors.length > 0; + } + return result; };
\ No newline at end of file diff --git a/build/monaco/api.js b/build/monaco/api.js index 77974bcc142..97877c63803 100644 --- a/build/monaco/api.js +++ b/build/monaco/api.js @@ -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;
diff --git a/build/monaco/api.ts b/build/monaco/api.ts index 44e619e8588..2ca2968c6c3 100644 --- a/build/monaco/api.ts +++ b/build/monaco/api.ts @@ -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'); +}
\ No newline at end of file diff --git a/gulpfile.js b/gulpfile.js index 3b3a997c746..cbee057d47b 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -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); |