Skip to content

Commit

Permalink
chore: setup build process with tsup
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanofa committed Sep 29, 2023
1 parent 995e7b6 commit ebb5548
Show file tree
Hide file tree
Showing 3 changed files with 145 additions and 27 deletions.
21 changes: 18 additions & 3 deletions packages/folks-router-js-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,29 @@
"name": "@folks-router/js-sdk",
"version": "0.0.0",
"description": "",
"main": "index.js",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
}
},
"files": [
"dist/**/*",
"README.md",
"LICENSE"
],
"keywords": [
"Folks Router",
"Folks Finance",
"Algorand"
],
"scripts": {
"clean": "rm -rf ./dist",
"build": "npm run clean && tsc",
"build": "tsup",
"typecheck": "tsc --noEmit",
"example": "ts-node --project tsconfig.json"
},
Expand All @@ -22,6 +36,7 @@
"@types/node": "^20.7.1",
"ts-node": "^10.9.1",
"tsconfig": "workspace:*",
"tsup": "^7.2.0",
"typedoc": "^0.25.1",
"typescript": "^5.2.2"
},
Expand Down
12 changes: 12 additions & 0 deletions packages/folks-router-js-sdk/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { defineConfig } from "tsup";

export default defineConfig({
entry: ["src/**/*.ts"],
splitting: true,
clean: true,
dts: true,
sourcemap: true,
skipNodeModulesBundle: true,
format: ["cjs", "esm"],
target: "es2020",
});
Loading

0 comments on commit ebb5548

Please sign in to comment.