Skip to content

Commit 96a7d0c

Browse files
committed
chore: use tsup to build esm and cjs
1 parent 139b63d commit 96a7d0c

File tree

6 files changed

+1026
-32
lines changed

6 files changed

+1026
-32
lines changed

package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,14 @@
22
"name": "opensensemap-client",
33
"description": "The library allows and improves type-based working with the openSenseMap API",
44
"version": "1.7.0",
5-
"type": "module",
6-
"main": "./dist/cjs/index.js",
7-
"module": "./dist/esm/index.js",
8-
"types": "./dist/dts/index.d.ts",
5+
"main": "./dist/cjs/index.cjs",
6+
"module": "./dist/esm/index.mjs",
7+
"types": "./dist/types/index.d.ts",
98
"exports": {
10-
"require": "./dist/cjs/index.js",
11-
"import": "./dist/esm/index.js",
12-
"deno": "./dist/esm/index.js",
13-
"types": "./dist/dts/index.d.ts",
14-
"default": "./dist/esm/index.js"
9+
".": {
10+
"import": "./dist/esm/index.mjs",
11+
"require": "./dist/cjs/index.cjs"
12+
}
1513
},
1614
"repository": "https://github.com/JulianWowra/opensensemap-client",
1715
"homepage": "https://julianwowra.github.io/opensensemap-client/",
@@ -30,22 +28,24 @@
3028
"eslint": "9.26.0",
3129
"eslint-config-prettier": "10.1.2",
3230
"prettier": "3.5.3",
31+
"tsup": "^8.4.0",
3332
"typedoc": "~0.28.4",
3433
"typedoc-github-theme": "~0.3.0",
3534
"typescript": "5.8.3",
3635
"typescript-eslint": "8.31.1"
3736
},
3837
"scripts": {
39-
"build": "pnpm run build:esm && pnpm run build:cjs && pnpm build:docs",
40-
"build:esm": "tsc -p tsconfig.esm.json",
41-
"build:cjs": "tsc -p tsconfig.cjs.json",
38+
"build": "pnpm run build:lib && pnpm build:docs",
39+
"build:lib": "tsup",
4240
"build:docs": "typedoc src --plugin typedoc-github-theme",
41+
"dev": "tsup --watch",
4342
"lint": "pnpm lint:format && pnpm lint:code",
4443
"lint:format": "prettier --check .",
4544
"lint:code": "eslint ."
4645
},
4746
"pnpm": {
4847
"onlyBuiltDependencies": [
48+
"esbuild",
4949
"eslint"
5050
]
5151
},

0 commit comments

Comments
 (0)