Skip to content

Commit

Permalink
fix: build issues, use tsup
Browse files Browse the repository at this point in the history
  • Loading branch information
grabbou committed Dec 17, 2024
1 parent 78a2d4d commit 5f053f0
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 80 deletions.
Binary file modified bun.lockb
Binary file not shown.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"eslint-plugin-simple-import-sort": "^12.0.0",
"prettier": "^3.2.5",
"release-it": "^17.10.0",
"tsup": "^8.3.5",
"tsx": "^4.19.2",
"typescript": "^5.1.3",
"vitest": "^2.1.1"
Expand Down
3 changes: 1 addition & 2 deletions packages/create-fabrice-ai/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
},
"scripts": {
"prepare": "bun run build",
"clean": "rm -rf dist",
"build": "bun build ./src/index.ts --outdir dist --packages external"
"build": "tsup-node"
},
"files": [
"dist",
Expand Down
9 changes: 9 additions & 0 deletions packages/create-fabrice-ai/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { defineConfig } from 'tsup'

export default defineConfig({
entry: ['./src/*.ts'],
format: ['esm'],
target: 'node20',
splitting: false,
clean: true,
})
10 changes: 5 additions & 5 deletions packages/framework/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
],
"scripts": {
"prepare": "bun run build",
"clean": "rm -rf dist",
"build": "bun run clean && bun run build:lib && bun run build:types",
"build:lib": "rslib build",
"build:types": "tsc --emitDeclarationOnly --declaration --outdir dist/types"
"build": "tsup-node"
},
"exports": {
"./*": {
"bun": "./src/*.ts",
"types": "./dist/types/*.d.ts",
"types": {
"import": "./dist/*.d.ts",
"require": "./dist/*.d.cts"
},
"require": "./dist/*.cjs",
"import": "./dist/*.js"
},
Expand Down
34 changes: 0 additions & 34 deletions packages/framework/rslib.config.ts

This file was deleted.

10 changes: 10 additions & 0 deletions packages/framework/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { defineConfig } from 'tsup'

export default defineConfig({
entry: ['./src/**/*.ts'],
format: ['cjs', 'esm'],
target: 'node20',
splitting: false,
clean: true,
dts: true,
})
14 changes: 9 additions & 5 deletions packages/tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
"scripts": {
"prepare": "bun run build",
"clean": "rm -rf dist",
"build": "bun run clean && bun run build:lib && bun run build:types",
"build:lib": "rslib build",
"build:types": "tsc --emitDeclarationOnly --declaration --outdir dist/types"
"build": "tsup-node"
},
"exports": {
"./*": {
"bun": "./src/*.ts",
"types": "./dist/types/*.d.ts",
"types": {
"import": "./dist/*.d.ts",
"require": "./dist/*.d.cts"
},
"require": "./dist/*.cjs",
"import": "./dist/*.js"
}
Expand Down Expand Up @@ -46,5 +47,8 @@
"engines": {
"node": ">=22"
},
"version": "0.5.0"
"version": "0.5.0",
"devDependencies": {
"tsup": "^8.3.5"
}
}
34 changes: 0 additions & 34 deletions packages/tools/rslib.config.ts

This file was deleted.

10 changes: 10 additions & 0 deletions packages/tools/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { defineConfig } from 'tsup'

export default defineConfig({
entry: ['./src/*.ts'],
format: ['cjs', 'esm'],
target: 'node20',
splitting: false,
clean: true,
dts: true,
})

0 comments on commit 5f053f0

Please sign in to comment.