diff --git a/build/tsc-dev.js b/build/tsc-dev.js index d33fa42e1..220abac2f 100644 --- a/build/tsc-dev.js +++ b/build/tsc-dev.js @@ -56,6 +56,7 @@ function transpile(fileNames, options) { }); console.timeEnd("transpile"); if (isWatching) { + // NOTE: Perhaps on file change before incremental compilation we should read the tsconfig.json again and update only tsconfig.json files. console.log("Watching for changes..."); fs.watch(".", { persistent: true, recursive: true, encoding: "utf8" }, function (event, file) { try { @@ -110,12 +111,11 @@ function compile(fileNames, options) { console.log("Process exiting with code " + exitCode + "."); process.exit(exitCode); } -// Perhaps on file change before incremental compilation we should read the tsconfig.json again. var configFileName = path.resolve("tsconfig.json"); var configObject = JSON.parse(fs.readFileSync("./tsconfig.json")); var configParseResult = ts.parseJsonConfigFileContent(configObject, ts.sys, path.dirname(configFileName)); -configParseResult.fileNames.forEach(console.log); if (isTranspile) { + configParseResult.options.noEmitOnError = false; transpile(configParseResult.fileNames, configParseResult.options); } else { diff --git a/build/tsc-dev.ts b/build/tsc-dev.ts index 39b9535e1..26aff3ab8 100644 --- a/build/tsc-dev.ts +++ b/build/tsc-dev.ts @@ -139,6 +139,7 @@ var configObject = JSON.parse(fs.readFileSync("./tsconfig.json")); var configParseResult = ts.parseJsonConfigFileContent(configObject, ts.sys, path.dirname(configFileName)); if (isTranspile) { + configParseResult.options.noEmitOnError = false; transpile(configParseResult.fileNames, configParseResult.options); } else { compile(configParseResult.fileNames, configParseResult.options);