Skip to content

Commit

Permalink
Setup tsup and remove unnecessary configs
Browse files Browse the repository at this point in the history
  • Loading branch information
octet-stream committed Oct 24, 2023
1 parent d8c119d commit 29a58a0
Show file tree
Hide file tree
Showing 9 changed files with 456 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"globalThis": true
},
"parserOptions": {
"project": "./tsconfig.eslint.json"
"project": "./tsconfig.json"
},
"settings": {
"import/resolver": {
Expand Down
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.DS_Store
.changeset
.github
node_modules
coverage
Expand All @@ -24,3 +25,4 @@ pnpm-lock.yaml
/tsconfig.d.ts.json
/tsconfig.ava.json
/src
/tsup.config.ts
18 changes: 11 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,26 @@
"exports": {
"./package.json": "./package.json",
".": {
"types": "./@type/index.d.ts",
"import": "./lib/index.js",
"default": "./lib/index.js"
"import": {
"types": "./lib/index.d.ts",
"default": "./lib/index.js"
},
"require": {
"types": "./lib/index.d.cts",
"default": "./lib/index.cjs"
}
}
},
"types": "./@type/index.d.ts",
"types": "./lib/index.d.ts",
"scripts": {
"eslint": "eslint src/**/*.ts",
"lint:types": "tsc --noEmit",
"lint": "pnpm eslint && pnpm lint:types",
"staged": "lint-staged",
"coverage": "c8 pnpm test",
"ci": "c8 pnpm test && c8 report --reporter=json",
"build:types": "tsc --project tsconfig.d.ts.json",
"build": "tsc && pnpm run build:types",
"build": "pnpm exec del-cli lib && pnpm exec tsup",
"test": "cross-env NODE_OPTIONS=\"--no-warnings --experimental-fetch --loader=ts-node/esm\" ava --fail-fast",
"cleanup": "del-cli @type lib",
"postinstall": "husky install",
"prepublishOnly": "pnpm run cleanup && pnpm run build && pinst --disable",
"postpublish": "pinst --enable",
Expand Down Expand Up @@ -73,6 +76,7 @@
"pinst": "3.0.0",
"sinon": "15.0.4",
"ts-node": "10.9.1",
"tsup": "7.2.0",
"ttypescript": "1.5.15",
"typescript": "5.0.4",
"web-streams-polyfill": "4.0.0-beta.3"
Expand Down
Loading

0 comments on commit 29a58a0

Please sign in to comment.