Skip to content
This repository was archived by the owner on Oct 22, 2025. It is now read-only.

Commit fe373b9

Browse files
committed
chore(core): add build:fast script
1 parent 6c3e109 commit fe373b9

File tree

4 files changed

+16
-8
lines changed

4 files changed

+16
-8
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"start": "npx turbo watch build",
66
"dev": "npx turbo watch dev",
77
"build": "npx turbo build",
8+
"build:fast": "FAST_BUILD=1 npx turbo build",
89
"test": "npx turbo test",
910
"test:watch": "npx turbo watch test",
1011
"check-types": "npx turbo check-types",

packages/rivetkit/turbo.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"build": {
1515
"dependsOn": ["^build", "dump-openapi", "build:schema"],
1616
"inputs": ["src/**", "tsconfig.json", "tsup.config.ts", "package.json"],
17-
"outputs": ["dist/**"]
17+
"outputs": ["dist/**"],
18+
"env": ["FAST_BUILD"]
1819
},
1920
"test": {
2021
"dependsOn": ["^test", "build"],

tsup.base.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
import type { Options } from "tsup";
22

3+
const FAST_BUILD = process.env.FAST_BUILD === "1";
4+
35
export default {
46
target: "node16",
57
platform: "node",
68
format: ["cjs", "esm"],
79
sourcemap: true,
810
clean: true,
9-
dts: {
10-
compilerOptions: {
11-
skipLibCheck: true,
12-
resolveJsonModule: true,
13-
},
14-
},
11+
// DTS takes the longest time, so we skip it if doing a fast build
12+
dts: FAST_BUILD
13+
? false
14+
: {
15+
compilerOptions: {
16+
skipLibCheck: true,
17+
resolveJsonModule: true,
18+
},
19+
},
1520
minify: false,
1621
// IMPORTANT: Splitting is required to fix a bug with ESM (https://github.com/egoist/tsup/issues/992#issuecomment-1763540165)
1722
splitting: true,

turbo.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"build": {
88
"dependsOn": ["^build"],
99
"inputs": ["src/**", "tsconfig.json", "tsup.config.ts", "package.json"],
10-
"outputs": ["dist/**"]
10+
"outputs": ["dist/**"],
11+
"env": ["FAST_BUILD"]
1112
},
1213
"check-types": {
1314
"inputs": [

0 commit comments

Comments
 (0)