Merge pull request #2222 from billti/tsconfigWatchFix

Fix watch to honor tsconfig.json setting
This commit is contained in:
Bill Ticehurst
2015-03-06 14:44:44 -08:00

View File

@@ -250,7 +250,7 @@ module ts {
var compileResult = compile(rootFileNames, compilerOptions, compilerHost);
if (!commandLine.options.watch) {
if (!compilerOptions.watch) {
return sys.exit(compileResult.exitStatus);
}
@@ -269,7 +269,7 @@ module ts {
}
// Use default host function
var sourceFile = hostGetSourceFile(fileName, languageVersion, onError);
if (sourceFile && commandLine.options.watch) {
if (sourceFile && compilerOptions.watch) {
// Attach a file watcher
sourceFile.fileWatcher = sys.watchFile(sourceFile.fileName, () => sourceFileChanged(sourceFile));
}