MCPcopy Index your code
hub / github.com/nodejs/node / parseBuildCommand

Function parseBuildCommand

test/fixtures/snapshot/typescript.js:40730–40751  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

40728 };
40729 /*@internal*/
40730 function parseBuildCommand(args) {
40731 var _a = parseCommandLineWorker(buildOptionsDidYouMeanDiagnostics, args), options = _a.options, watchOptions = _a.watchOptions, projects = _a.fileNames, errors = _a.errors;
40732 var buildOptions = options;
40733 if (projects.length === 0) {
40734 // tsc -b invoked with no extra arguments; act as if invoked with "tsc -b ."
40735 projects.push(".");
40736 }
40737 // Nonsensical combinations
40738 if (buildOptions.clean && buildOptions.force) {
40739 errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Options_0_and_1_cannot_be_combined, "clean", "force"));
40740 }
40741 if (buildOptions.clean && buildOptions.verbose) {
40742 errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Options_0_and_1_cannot_be_combined, "clean", "verbose"));
40743 }
40744 if (buildOptions.clean && buildOptions.watch) {
40745 errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Options_0_and_1_cannot_be_combined, "clean", "watch"));
40746 }
40747 if (buildOptions.watch && buildOptions.dry) {
40748 errors.push(ts.createCompilerDiagnostic(ts.Diagnostics.Options_0_and_1_cannot_be_combined, "watch", "dry"));
40749 }
40750 return { buildOptions: buildOptions, watchOptions: watchOptions, projects: projects, errors: errors };
40751 }
40752 ts.parseBuildCommand = parseBuildCommand;
40753 /* @internal */
40754 function getDiagnosticText(_message) {

Callers

nothing calls this directly

Calls 2

parseCommandLineWorkerFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected