Skip to content

Commit

Permalink
Use tsbuild to build project. Remove umd format support.
Browse files Browse the repository at this point in the history
  • Loading branch information
octet-stream committed Nov 9, 2023
1 parent 17d0287 commit 1096df8
Show file tree
Hide file tree
Showing 9 changed files with 492 additions and 42 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"root": true,
"parserOptions": {
"project": "./tsconfig.eslint.json"
"project": "./tsconfig.json"
},
"extends": [
"@octetstream/eslint-config/esm/typescript/react"
Expand Down
10 changes: 1 addition & 9 deletions .size-limit.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,7 @@
"limit": "1.5 KB"
},
{
"path": "lib/useSuspender.mjs",
"limit": "1.5 KB"
},
{
"path": "lib/useSuspender.legacy.mjs",
"limit": "2 KB"
},
{
"path": "lib/useSuspender.umd.js",
"path": "lib/useSuspender.js",
"limit": "1.5 KB"
}
]
24 changes: 15 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,29 @@
"react-hooks"
],
"packageManager": "[email protected]",
"source": "./src/useSuspender.ts",
"main": "./lib/useSuspender.mjs",
"umd:main": "./lib/useSuspender.umd.js",
"module": "./lib/useSuspender.legacy.mjs",
"main": "./lib/useSuspender.js",
"types": "./lib/useSuspender.d.ts",
"exports": {
"import": "./lib/useSuspender.mjs",
"require": "./lib/useSuspender.cjs",
"types": "./lib/useSuspender.d.ts",
"default": "./lib/useSuspender.mjs"
"import": {
"types": "./lib/useSuspender.d.ts",
"default": "./lib/useSuspender.js"
},
"require": {
"types": "./lib/useSuspender.d.cts",
"default": "./lib/useSuspender.cjs"
},
"default": {
"types": "./lib/useSuspender.d.ts",
"default": "./lib/useSuspender.js"
}
},
"repository": "octet-stream/use-suspender",
"author": "Nick K. <[email protected]>",
"license": "MIT",
"private": false,
"scripts": {
"cleanup": "del-cli lib",
"build": "microbundle --tsconfig tsconfig.build.json --jsx React.createElement --jsxFragment React.Fragment --jsxImportSource react --globals react/jsx-runtime=jsx",
"build": "del-cli lib && tsup",
"size-limit": "size-limit",
"staged": "lint-staged",
"coverage": "c8 npm test",
Expand Down Expand Up @@ -70,6 +75,7 @@
"sinon": "17.0.1",
"size-limit": "8.2.4",
"ts-node": "10.9.1",
"tsup": "^7.2.0",
"typescript": "5.2.2"
},
"peerDependencies": {
Expand Down
Loading

0 comments on commit 1096df8

Please sign in to comment.