diff --git a/packages/api-client/.gitignore b/packages/api-client/.gitignore new file mode 100644 index 00000000..1521c8b7 --- /dev/null +++ b/packages/api-client/.gitignore @@ -0,0 +1 @@ +dist diff --git a/packages/api-client/package.json b/packages/api-client/package.json index 8b9dd7d5..ce309390 100644 --- a/packages/api-client/package.json +++ b/packages/api-client/package.json @@ -3,7 +3,10 @@ "version": "0.0.1", "description": "", "main": "index.js", - "scripts": {}, + "scripts": { + "build": "tsup", + "dev": "tsup --watch" + }, "keywords": [], "author": "imput ", "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"] } } diff --git a/packages/api-client/src/index.ts b/packages/api-client/src/index.ts new file mode 100644 index 00000000..1150310b --- /dev/null +++ b/packages/api-client/src/index.ts @@ -0,0 +1,3 @@ +export * from "./turnstile-api"; +export * from "./unauthenticated-api"; +export * from "./types/interface";