fix(tsbuild): Avoid process.exit in library, add confirmskiplibcheck flag, improve CLI exit handling and JSON/quiet modes, update test script
This commit is contained in:
@@ -9,7 +9,7 @@ export const runCli = async () => {
|
||||
* the standard task compiles anything in ts/ directory to dist directory
|
||||
*/
|
||||
tsbuildCli.standardCommand().subscribe(async (argvArg) => {
|
||||
tsbuild.compileGlobStringObject(
|
||||
await tsbuild.compileGlobStringObject(
|
||||
{
|
||||
'./ts/**/*.ts': './dist_ts',
|
||||
},
|
||||
@@ -17,6 +17,10 @@ export const runCli = async () => {
|
||||
process.cwd(),
|
||||
argvArg
|
||||
);
|
||||
const summary = (argvArg as any)?.__tsbuildFinalErrorSummary;
|
||||
if (summary && summary.totalErrors > 0) {
|
||||
process.exit(1);
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
@@ -30,6 +34,10 @@ export const runCli = async () => {
|
||||
compilationCommandObject[`./${directory}/**/*.ts`] = `./dist_${directory}`;
|
||||
}
|
||||
await tsbuild.compileGlobStringObject(compilationCommandObject, {}, process.cwd(), argvArg);
|
||||
const summary = (argvArg as any)?.__tsbuildFinalErrorSummary;
|
||||
if (summary && summary.totalErrors > 0) {
|
||||
process.exit(1);
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
@@ -182,6 +190,10 @@ export const runCli = async () => {
|
||||
compilationCommandObject[`./${tsFolder}/**/*.ts`] = `./dist_${tsFolder}`;
|
||||
}
|
||||
await tsbuild.compileGlobStringObject(compilationCommandObject, {}, process.cwd(), argvArg);
|
||||
const summary = (argvArg as any)?.__tsbuildFinalErrorSummary;
|
||||
if (summary && summary.totalErrors > 0) {
|
||||
process.exit(1);
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user