Use tsup for building the lib

This commit is contained in:
Yura Dupyn 2026-04-06 20:15:21 +02:00
parent cfe02da073
commit 2f5ead6d68
2 changed files with 1455 additions and 3 deletions

1443
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -4,13 +4,22 @@
"description": "Source text manipulation and span rendering utilities",
"author": "Yura Dupyn <yura@dupyn.com>",
"license": "GPL-3.0-or-later",
"type": "module",
"main": "src/index.ts",
"types": "src/index.ts",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.mjs",
"require": "./dist/index.js"
}
},
"scripts": {
"build": "tsup src/index.ts --format cjs,esm --dts",
"typecheck": "tsc --noEmit"
},
"devDependencies": {
"tsup": "^8.5.1",
"typescript": "^5.4.0"
}
}