Skip to content

Commit 4809212

Browse files
committed
fix: fixed flag support
1 parent f50f9b8 commit 4809212

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

src/build/build.ts

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,13 @@ buildCommand.action(async (argPath: string) => {
3434
ci = !!opts["ci"],
3535
all =
3636
!!opts["all"] ||
37-
(!opts["bundle"] && !opts["clean"] && !opts["dist"] && !opts["lint"] && !opts["prettify"] && !opts["tsc"]),
37+
(!opts["bundle"] &&
38+
!opts["clean"] &&
39+
!opts["circularDeps"] &&
40+
!opts["dist"] &&
41+
!opts["lint"] &&
42+
!opts["prettify"] &&
43+
!opts["tsc"]),
3844
doBundle = all || !!opts["bundle"],
3945
circularDeps = all || !!opts["circularDeps"],
4046
clean = all || !!opts["clean"],
@@ -74,16 +80,20 @@ buildCommand.action(async (argPath: string) => {
7480
canContinue = await lint(ci, silent);
7581
}
7682

77-
if (canContinue && tsc) {
78-
const { buildTS } = await import("./build-tsc.js");
83+
if (canContinue && (tsc || circularDeps)) {
84+
const checks: Promise<boolean>[] = [];
7985

80-
canContinue = await buildTS(basePath, silent);
81-
}
86+
if (tsc) {
87+
checks.push(import("./build-tsc.js").then(({ buildTS }) => buildTS(basePath, silent)));
88+
}
8289

83-
if (canContinue && circularDeps) {
84-
const { buildCircularDeps } = await import("./build-circular-deps.js");
90+
if (circularDeps) {
91+
checks.push(
92+
import("./build-circular-deps.js").then(({ buildCircularDeps }) => buildCircularDeps(basePath, silent)),
93+
);
94+
}
8595

86-
canContinue = await buildCircularDeps(basePath, silent);
96+
canContinue = (await Promise.all(checks)).every(result => result);
8797
}
8898

8999
if (canContinue && doBundle) {

0 commit comments

Comments
 (0)