Skip to content

Commit

Permalink
feat: add esm bundling
Browse files Browse the repository at this point in the history
  • Loading branch information
roushou committed Jun 19, 2024
1 parent 9f6ec2f commit c086be6
Show file tree
Hide file tree
Showing 7 changed files with 603 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,6 @@ jobs:

- name: TypeCheck
run: pnpm typecheck

- name: Build
run: pnpm build
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Dependencies
node_modules

# Build outputs
dist

# Environment variables
.env
3 changes: 3 additions & 0 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,8 @@
"formatter": {
"trailingCommas": "none"
}
},
"files": {
"ignore": ["dist"]
}
}
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"private": true,
"type": "module",
"scripts": {
"build": "pnpm --recursive build",
"clean": "pnpm --recursive clean",
"typecheck": "pnpm --recursive typecheck",
"test": "vitest run",
"test:watch": "vitest",
Expand All @@ -20,6 +22,8 @@
"@types/node": "^20.14.5",
"@vitest/ui": "^1.6.0",
"msw": "^2.3.1",
"rimraf": "^5.0.7",
"tsup": "^8.1.0",
"typescript": "^5.4.5",
"vitest": "^1.6.0"
},
Expand Down
2 changes: 2 additions & 0 deletions packages/onchain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"author": "roushou",
"type": "module",
"scripts": {
"build": "tsup",
"clean": "rimraf ./dist",
"typecheck": "tsc --noEmit"
},
"peerDependencies": {
Expand Down
8 changes: 8 additions & 0 deletions packages/onchain/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { defineConfig } from "tsup";

export default defineConfig({
entry: ["./src/index.ts"],
format: ["esm"],
splitting: true,
dts: true,
});
Loading

0 comments on commit c086be6

Please sign in to comment.