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