Skip to content

Commit

Permalink
setup build tsconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
Raunak Chowdhuri committed Aug 29, 2023
1 parent 18cc31b commit cfa7224
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
16 changes: 12 additions & 4 deletions ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
"dist/"
],
"scripts": {
"dev": "tsup src/* --format esm,cjs --dts --watch",
"dev": "tsup src/* --format esm,cjs --dts --watch ",
"test": "vitest",
"build": "tsup src/* --format esm,cjs --dts",
"build": "tsup src/* --format esm,cjs --dts --tsconfig tsconfig.build.json",
"publish-package": "pnpm run clean && pnpm run build && pnpm publish --access public",
"clean": "rm -rf dist"
},
Expand All @@ -25,7 +25,15 @@
"zod-to-ts": "^1.1.4"
},
"exports": {
".": "./dist/index.js",
"./llm": "./dist/llm.js"
".": {
"import": "./dist/index.js",
"require": "./dist/index.mjs",
"types": "./dist/index.d.ts"
},
"./llm": {
"import": "./dist/llm.js",
"require": "./dist/llm.mjs",
"types": "./dist/llm.d.ts"
}
}
}
9 changes: 9 additions & 0 deletions ts/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"compilerOptions": {
"lib": ["es2017"],
"module": "NodeNext",
"target": "ES2015",
"moduleResolution": "NodeNext",
"exclude": ["src/**/*.test.ts"]
}
}

0 comments on commit cfa7224

Please sign in to comment.