Skip to content

Commit

Permalink
🔧 Switch from bun bundler to tsc
Browse files Browse the repository at this point in the history
  • Loading branch information
DRFR0ST committed Dec 15, 2023
1 parent 6750f44 commit d22f369
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 33 deletions.
8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "reclaim-unofficial-api",
"module": "src/index.ts",
"module": "dist/index.ts",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"version": "1.0.0-alpha.5",
Expand All @@ -10,11 +10,9 @@
"license": "MIT",
"scripts": {
"dev": "bun --watch src/index.ts",
"build": "bun run clean && bun run build:library && bun run build:declaration",
"build:library": "bun build src/index.ts --outdir dist --minify --splitting --sourcemap --target node",
"build:declaration": "tsc --emitDeclarationOnly --project tsconfig.types.json",
"build": "bun run clean && tsc --project tsconfig.json",
"clean": "rimraf dist",
"postbuild": "rimraf tsconfig.types.tsbuildinfo",
"postbuild": "rimraf tsconfig.tsbuildinfo",
"test": "bun test --coverage",
"example": "bun run ./example/index.ts",
"prepublish": "bun run build"
Expand Down
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

const RECLAIM_API_URL = "https://api.app.reclaim.ai";
const RECLAIM_ACCESS_TOKEN = process.env.RECLAIM_ACCESS_TOKEN;
const RECLAIM_ACCESS_TOKEN = process?.env?.RECLAIM_ACCESS_TOKEN;

/**
* @description Configuration for the Reclaim API client.
Expand Down
11 changes: 7 additions & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
"lib": ["ESNext"],
"module": "esnext",
"target": "esnext",
"moduleResolution": "bundler",
"moduleResolution": "node",
"moduleDetection": "force",
"outDir": "dist",
"allowImportingTsExtensions": true,
"noEmit": true,
"rootDir": "src",
"noEmit": false,
"declaration": true,
"composite": true,
"strict": true,
"downlevelIteration": true,
Expand All @@ -19,5 +20,7 @@
"types": [
"bun-types" // add Bun global
]
}
},
"include": ["src/**/*.ts"],
"exclude": ["node_modules", "dist", "tests", "example"]
}
23 changes: 0 additions & 23 deletions tsconfig.types.json

This file was deleted.

0 comments on commit d22f369

Please sign in to comment.