(ctx context.Context, sys tsc.System, buildCommand *tsoptions.ParsedBuildCommandLine, testing tsc.CommandLineTesting)
| 88 | } |
| 89 | |
| 90 | func tscBuildCompilation(ctx context.Context, sys tsc.System, buildCommand *tsoptions.ParsedBuildCommandLine, testing tsc.CommandLineTesting) tsc.CommandLineResult { |
| 91 | locale := buildCommand.Locale() |
| 92 | reportDiagnostic := tsc.CreateDiagnosticReporter(sys, sys.Writer(), locale, buildCommand.CompilerOptions) |
| 93 | |
| 94 | if len(buildCommand.Errors) > 0 { |
| 95 | for _, err := range buildCommand.Errors { |
| 96 | reportDiagnostic(err) |
| 97 | } |
| 98 | return tsc.CommandLineResult{Status: tsc.ExitStatusDiagnosticsPresent_OutputsSkipped} |
| 99 | } |
| 100 | |
| 101 | if pprofDir := buildCommand.CompilerOptions.PprofDir; pprofDir != "" { |
| 102 | // !!! stderr? |
| 103 | profileSession := pprof.BeginProfiling(pprofDir, sys.Writer()) |
| 104 | defer profileSession.Stop() |
| 105 | } |
| 106 | |
| 107 | if buildCommand.CompilerOptions.Help.IsTrue() { |
| 108 | tsc.PrintVersion(sys, locale) |
| 109 | tsc.PrintBuildHelp(sys, locale, tsoptions.BuildOpts) |
| 110 | return tsc.CommandLineResult{Status: tsc.ExitStatusSuccess} |
| 111 | } |
| 112 | |
| 113 | orchestrator := build.NewOrchestrator(build.Options{ |
| 114 | Sys: sys, |
| 115 | Command: buildCommand, |
| 116 | Testing: testing, |
| 117 | }) |
| 118 | return orchestrator.Start(ctx) |
| 119 | } |
| 120 | |
| 121 | func tscCompilation(ctx context.Context, sys tsc.System, commandLine *tsoptions.ParsedCommandLine, testing tsc.CommandLineTesting) tsc.CommandLineResult { |
| 122 | configFileName := "" |
no test coverage detected