File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -432,6 +432,16 @@ namespace ts {
432
432
return sys . exit ( compileResult . exitStatus ) ;
433
433
}
434
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
+
435
445
setCachedProgram ( compileResult . program ) ;
436
446
reportWatchDiagnostic ( createCompilerDiagnostic ( Diagnostics . Compilation_complete_Watching_for_file_changes ) ) ;
437
447
}
You can’t perform that action at this time.
0 commit comments