diff --git a/legacy/package.json b/legacy/package.json index d1ee4aaa..64085331 100644 --- a/legacy/package.json +++ b/legacy/package.json @@ -6,21 +6,32 @@ "repository": "transitive-bullshit/agentic", "license": "MIT", "type": "module", + "source": "./src/index.ts", + "types": "./build/index.d.ts", + "exports": { + ".": { + "import": "./build/index.js", + "require": "./build/index.cjs", + "types": "./build/index.d.ts", + "default": "./build/index.js" + } + }, + "files": [ + "build" + ], "engines": { "node": ">=14" }, "scripts": { - "build": "run-s build:*", - "build:tsup": "lerna run build --no-private", - "build:tsc": "tsc --build", - "deploy": "lerna run deploy", - "clean": "del packages/*/build", + "build": "tsup", + "dev": "tsup --watch", + "clean": "del build", "prebuild": "run-s clean", + "predev": "run-s clean", + "pretest": "run-s build", "prepare": "husky install", "pre-commit": "lint-staged", - "pretest": "run-s build", "test": "run-p test:*", - "test:unit": "ava", "test:prettier": "prettier '**/*.{js,jsx,ts,tsx}' --check" }, "dependencies": { diff --git a/legacy/tsconfig.json b/legacy/tsconfig.json new file mode 100644 index 00000000..9c6127d4 --- /dev/null +++ b/legacy/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "target": "es2020", + "lib": ["esnext"], + "allowJs": true, + "skipLibCheck": true, + "strict": false, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "node", + "resolveJsonModule": true, + "isolatedModules": true, + "baseUrl": ".", + "outDir": "build", + "noEmit": true + }, + "exclude": ["node_modules", "build"], + "include": ["**/*.ts"] +} diff --git a/legacy/tsup.config.ts b/legacy/tsup.config.ts new file mode 100644 index 00000000..f6f0cac4 --- /dev/null +++ b/legacy/tsup.config.ts @@ -0,0 +1,16 @@ +import { defineConfig } from 'tsup' + +export default defineConfig([ + { + entry: ['src/index.ts'], + outDir: 'build', + target: 'node16', + platform: 'node', + format: ['esm', 'cjs'], + splitting: false, + sourcemap: true, + minify: false, + shims: true, + dts: true + } +])