Skip to content

Commit b186053

Browse files
committed
Use tsc
1 parent 2154530 commit b186053

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

packages/cli/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"prepublishOnly": "pnpm build",
88
"types": "tsc",
99
"types:watch": "tsc --watch",
10-
"build": "swc src --strip-leading-paths -d lib --ignore '**/*.test.ts' --ignore '**/__mocks__/**'",
11-
"build:watch": "swc src --strip-leading-paths -d lib --watch --ignore '**/*.test.ts' --ignore '**/__mocks__/**'",
10+
"build": "tsc",
11+
"build:watch": "tsc --watch",
1212
"format:src": "prettier --write src",
1313
"format:examples": "prettier --write examples",
1414
"format": "pnpm format:src && pnpm format:examples",

packages/cli/src/swc/bin.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ import parseArgs, { initProgram } from "./options";
44

55
initProgram();
66
const opts = parseArgs(process.argv);
7+
if (!opts) {
8+
process.exit(1);
9+
}
10+
711
const fn = opts.cliOptions.outDir ? dirCommand : fileCommand;
812

913
process.on("uncaughtException", function (err) {

packages/cli/src/swc/options.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ export default function parserArgs(args: string[]) {
297297
if (opts.cliConfigFile) {
298298
try {
299299
opts = loadCLIConfigFile(program, opts, opts.cliConfigFile);
300-
} catch (e: any) {
300+
} catch (e) {
301301
verifyArgsErrors([e.message]);
302302
return;
303303
}

0 commit comments

Comments
 (0)