api-client/package: configure tsup output and exports
This commit is contained in:
parent
00d5754ea8
commit
d201deb60a
3 changed files with 24 additions and 1 deletions
1
packages/api-client/.gitignore
vendored
Normal file
1
packages/api-client/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
dist
|
|
@ -3,7 +3,10 @@
|
|||
"version": "0.0.1",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {},
|
||||
"scripts": {
|
||||
"build": "tsup",
|
||||
"dev": "tsup --watch"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "imput <meow@imput.net>",
|
||||
"license": "MIT",
|
||||
|
@ -13,5 +16,21 @@
|
|||
"turnstile-types": "^1.2.2",
|
||||
"typescript": "^5.4.5",
|
||||
"zod": "^3.23.8"
|
||||
},
|
||||
"type": "module",
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"import": "./dist/index.js",
|
||||
"require": "./dist/index.cjs"
|
||||
}
|
||||
},
|
||||
"tsup": {
|
||||
"dts": true,
|
||||
"bundle": false,
|
||||
"treeshake": true,
|
||||
"target": "node18",
|
||||
"format": ["esm", "cjs"],
|
||||
"entry": ["src/**/*.ts"]
|
||||
}
|
||||
}
|
||||
|
|
3
packages/api-client/src/index.ts
Normal file
3
packages/api-client/src/index.ts
Normal file
|
@ -0,0 +1,3 @@
|
|||
export * from "./turnstile-api";
|
||||
export * from "./unauthenticated-api";
|
||||
export * from "./types/interface";
|
Loading…
Reference in a new issue