We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent da01975 commit 0d32570Copy full SHA for 0d32570
1 file changed
src/compiler/tsc.ts
@@ -432,6 +432,16 @@ namespace ts {
432
return sys.exit(compileResult.exitStatus);
433
}
434
435
+ if (!directoryWatcher && sys.watchDirectory && configFileName) {
436
+ const directory = ts.getDirectoryPath(configFileName);
437
+ directoryWatcher = sys.watchDirectory(
438
+ // When the configFileName is just "tsconfig.json", the watched directory should be
439
+ // the current directory; if there is a given "project" parameter, then the configFileName
440
+ // is an absolute file name.
441
+ directory == "" ? "." : directory,
442
+ watchedDirectoryChanged, /*recursive*/ true);
443
+ }
444
+
445
setCachedProgram(compileResult.program);
446
reportWatchDiagnostic(createCompilerDiagnostic(Diagnostics.Compilation_complete_Watching_for_file_changes));
447
0 commit comments