bundle with tsup

This commit is contained in:
cupcakearmy 2022-06-01 00:42:17 +02:00
parent 0061331ad5
commit 9a29dee68c
No known key found for this signature in database
GPG Key ID: 3235314B4D31232F
4 changed files with 795 additions and 29 deletions

View File

@ -1,20 +1,16 @@
{ {
"name": "canihazusername", "name": "canihazusername",
"version": "2.3.2", "version": "2.3.3",
"description": "username generator. typed, simple and customizable", "description": "username generator. typed, simple and customizable",
"type": "module", "type": "module",
"main": "./dist/cjs/index.js", "main": "./dist/index.cjs",
"types": "./dist/cjs/index.d.ts", "module": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": { "exports": {
".": { ".": {
"import": { "require": "./dist/index.js",
"default": "./dist/esm/index.js", "import": "./dist/index.mjs",
"types": "./dist/esm/index.d.ts" "types": "./dist/index.d.ts"
},
"require": {
"default": "./dist/cjs/index.js",
"types": "./dist/cjs/index.d.ts"
}
} }
}, },
"files": [ "files": [
@ -29,12 +25,11 @@
"scripts": { "scripts": {
"generate": "git submodule update && node ./generate/wordlist.js", "generate": "git submodule update && node ./generate/wordlist.js",
"dev": "tsc -w", "dev": "tsc -w",
"build:esm": "tsc -p ./tsconfig.esm.json", "build": "tsup src/index.ts --format cjs,esm --dts --sourcemap",
"build:cjs": "tsc -p ./tsconfig.cjs.json",
"build": "pnpm run build:esm && pnpm run build:cjs",
"docs": "pnpm run build && parcel build --target docs demo/index.html", "docs": "pnpm run build && parcel build --target docs demo/index.html",
"docs:dev": "parcel --target docs demo/index.html", "docs:dev": "parcel --target docs demo/index.html",
"prepublishOnly": "rm -rf ./dist && pnpm run build" "prepublishOnly": "rm -rf ./dist && pnpm run build",
"clean": "rm -rf ./dist ./build ./.parcel-cache"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
@ -55,6 +50,7 @@
"devDependencies": { "devDependencies": {
"bulma": "^0.9.4", "bulma": "^0.9.4",
"parcel": "^2.6.0", "parcel": "^2.6.0",
"tsup": "^6.0.1",
"typescript": "^4.7.2" "typescript": "^4.7.2"
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +0,0 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "commonjs",
"outDir": "./dist/cjs/"
}
}

View File

@ -1,7 +0,0 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"module": "ES2020",
"outDir": "./dist/esm/"
}
}