Skip to content

Commit

Permalink
chore: add tsup
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien-R44 committed Jul 26, 2023
1 parent 40c5c2e commit b01dcba
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"prebenchmark": "npm run build",
"benchmark": "node build/benchmarks/flat_object.js && node build/benchmarks/nested_object.js && node build/benchmarks/array.js && node build/benchmarks/union.js",
"typecheck": "tsc --noEmit",
"compile": "npm run lint && npm run clean && tsc",
"compile": "npm run lint && npm run clean && tsup",
"build": "npm run compile",
"release": "np",
"version": "npm run build",
Expand Down Expand Up @@ -62,6 +62,7 @@
"np": "^8.0.4",
"prettier": "^3.0.0",
"ts-node": "^10.9.1",
"tsup": "^7.1.0",
"typescript": "^5.1.3",
"yup": "^1.2.0",
"zod": "^3.21.4"
Expand Down
11 changes: 11 additions & 0 deletions tsup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { defineConfig } from 'tsup'

export default defineConfig({
entry: ['./index.ts', './src/types.ts'],
outDir: './build',
clean: true,
format: 'esm',
dts: true,
target: 'esnext',
noExternal: ['validator'], // remove this if you don't want to bundle validator
})

0 comments on commit b01dcba

Please sign in to comment.