| 50 | } |
| 51 | |
| 52 | func CommandLine(ctx context.Context, sys tsc.System, commandLineArgs []string, testing tsc.CommandLineTesting) tsc.CommandLineResult { |
| 53 | if len(commandLineArgs) > 0 { |
| 54 | switch strings.ToLower(commandLineArgs[0]) { |
| 55 | case "-b", "--b", "-build", "--build": |
| 56 | return tscBuildCompilation(ctx, sys, tsoptions.ParseBuildCommandLine(commandLineArgs, sys), testing) |
| 57 | // case "-f": |
| 58 | // return fmtMain(sys, commandLineArgs[1], commandLineArgs[1]) |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | return tscCompilation(ctx, sys, tsoptions.ParseCommandLine(commandLineArgs, sys), testing) |
| 63 | } |
| 64 | |
| 65 | func fmtMain(sys tsc.System, input, output string) tsc.ExitStatus { |
| 66 | ctx := format.WithFormatCodeSettings(context.Background(), lsutil.GetDefaultFormatCodeSettings(), "\n") |