void CompileFiles(TypeScriptProject project, FileName[] fileNames) { ReportCompileStarting(project); bool errors = false; TypeScriptContext context = TypeScriptService.ContextProvider.GetContext(fileNames.First()); var compiler = new LanguageServiceCompiler(context); project.CreateOutputDirectory(); foreach (FileName fileName in fileNames) { UpdateFile(context, fileName); LanguageServiceCompilerResult result = compiler.Compile(fileName, project); if (result.HasErrors) { errors = true; Report(result.GetError()); } } ReportCompileFinished(errors); }