Skip to content

Commit 9c60210

Browse files
Merge pull request NativeScript#2302 from NativeScript/cankov/transpile-emits-on-errors
Transpile should be allowed to emit on errors
2 parents 423066a + 3e411df commit 9c60210

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

build/tsc-dev.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ function transpile(fileNames, options) {
5656
});
5757
console.timeEnd("transpile");
5858
if (isWatching) {
59+
// NOTE: Perhaps on file change before incremental compilation we should read the tsconfig.json again and update only tsconfig.json files.
5960
console.log("Watching for changes...");
6061
fs.watch(".", { persistent: true, recursive: true, encoding: "utf8" }, function (event, file) {
6162
try {
@@ -110,12 +111,11 @@ function compile(fileNames, options) {
110111
console.log("Process exiting with code " + exitCode + ".");
111112
process.exit(exitCode);
112113
}
113-
// Perhaps on file change before incremental compilation we should read the tsconfig.json again.
114114
var configFileName = path.resolve("tsconfig.json");
115115
var configObject = JSON.parse(fs.readFileSync("./tsconfig.json"));
116116
var configParseResult = ts.parseJsonConfigFileContent(configObject, ts.sys, path.dirname(configFileName));
117-
configParseResult.fileNames.forEach(console.log);
118117
if (isTranspile) {
118+
configParseResult.options.noEmitOnError = false;
119119
transpile(configParseResult.fileNames, configParseResult.options);
120120
}
121121
else {

build/tsc-dev.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ var configObject = JSON.parse(fs.readFileSync("./tsconfig.json"));
139139
var configParseResult = ts.parseJsonConfigFileContent(configObject, ts.sys, path.dirname(configFileName));
140140

141141
if (isTranspile) {
142+
configParseResult.options.noEmitOnError = false;
142143
transpile(configParseResult.fileNames, configParseResult.options);
143144
} else {
144145
compile(configParseResult.fileNames, configParseResult.options);

0 commit comments

Comments
 (0)