Skip to content

Commit 70a9ed7

Browse files
committed
feat: add iife format bundle for tsup config
1 parent 0c62419 commit 70a9ed7

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ import { FilesDB } from '@kieranwv/utils'
1717
const db = new FilesDB()
1818
```
1919

20+
## Utils
21+
22+
| name | description |
23+
| -------------------------------- | -------------------------------------- |
24+
| [`FilesDB`](./src/files-db.ts) | The CRUD class for indexDB in browser. |
25+
2026
## License
2127

2228
[MIT License](./LICENSE) © 2024 [Kieran Wang](https://github.com/kieranwv/)

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@kieranwv/utils",
33
"type": "module",
4-
"version": "1.0.0",
4+
"version": "0.1.0",
55
"packageManager": "pnpm@9.10.0",
66
"description": "Collection of common JavaScript / TypeScript utils by @kieranwv.",
77
"author": "Kieran Wang <kieranwme@gmail.com> (https://github.com/kieranwv/)",
@@ -49,16 +49,16 @@
4949
"release": "bumpp && pnpm build && pnpm publish"
5050
},
5151
"devDependencies": {
52-
"@antfu/eslint-config": "^2.27.3",
53-
"bumpp": "^9.5.2",
54-
"eslint": "^8.57.0",
52+
"@antfu/eslint-config": "^3.8.0",
53+
"bumpp": "^9.8.1",
54+
"eslint": "^9.14.0",
5555
"jsdom": "^24.1.3",
56-
"lint-staged": "^15.2.9",
56+
"lint-staged": "^15.2.10",
5757
"rimraf": "^5.0.10",
5858
"simple-git-hooks": "^2.11.1",
59-
"tsup": "^8.2.4",
60-
"typescript": "^5.5.4",
61-
"vitest": "^2.0.5"
59+
"tsup": "^8.3.5",
60+
"typescript": "^5.6.3",
61+
"vitest": "^2.1.5"
6262
},
6363
"simple-git-hooks": {
6464
"pre-commit": "pnpm lint-staged"

tsup.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import { defineConfig } from 'tsup'
33
export default defineConfig({
44
entry: ['src/index.ts'],
55
clean: true,
6-
format: ['cjs', 'esm'],
6+
format: ['cjs', 'esm', 'iife'],
7+
globalName: 'KieranwvUtils',
78
dts: true,
89
minify: true,
910
})

0 commit comments

Comments
 (0)