Skip to content

Commit b796508

Browse files
committed
Fix build
1 parent 18c22c1 commit b796508

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/api/build.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,16 @@ swagger-typescript-api --path ./spec/openapi.yaml --output ./src/ --name client.
2828
# Then we bundle into an importable JSON module
2929
swagger-cli bundle ./spec/openapi.yaml --outfile ./spec/openapi.json --type json
3030

31+
# Then we extract the API constants
32+
echo "Extracting API constants..."
33+
bun ./scripts/extract-constants.ts
34+
3135
# Then we build the JS files
3236
echo "Bundling CJS format from code..."
3337
esbuild ./src/index.ts --bundle --platform=node --format=cjs --outfile=./dist/index.cjs --log-level=warning
3438
echo "Bundling ESM format from code..."
3539
esbuild ./src/index.ts --bundle --platform=node --format=esm --outfile=./dist/index.js --log-level=warning
3640

37-
echo "Extracting API constants..."
38-
bun ./scripts/extract-constants.ts
39-
4041
# Finally we build the TypeScript declaration files
4142
echo "Generating public types from code..."
4243
tsc --project tsconfig.json --noEmit false --declaration --allowJs --emitDeclarationOnly --outDir ./dist/ --rootDir ./src

0 commit comments

Comments
 (0)