Skip to content

Commit 5583ac3

Browse files
committed
feat: 🎸 Add banner
1 parent cd91642 commit 5583ac3

File tree

5 files changed

+20
-4
lines changed

5 files changed

+20
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![codecov](https://codecov.io/gh/ha0z1/idmp/branch/main/graph/badge.svg)](https://app.codecov.io/gh/ha0z1/idmp/blob/main/src%2Findex.ts)
66
[![contributors](https://img.shields.io/github/contributors/ha0z1/idmp)](https://github.com/ha0z1/idmp/graphs/contributors)
77
[![LICENSE](https://img.shields.io/npm/l/idmp)](https://github.com/ha0z1/idmp/blob/main/LICENSE)
8-
[![Size](https://img.shields.io/bundlephobia/minzip/idmp.svg)](https://unpkg.com/idmp/dist/)
8+
[![Size](https://img.shields.io/bundlephobia/minzip/idmp.svg)](https://cdn.jsdelivr.net/npm/idmp/+esm)
99

1010
An elegant library to solve duplicate and concurrent calls for idempotent functions, pure function. Less than 1 KB after Gzip
1111

README.zh-CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
[![codecov](https://codecov.io/gh/ha0z1/idmp/branch/main/graph/badge.svg)](https://app.codecov.io/gh/ha0z1/idmp/blob/main/src%2Findex.ts)
66
[![contributors](https://img.shields.io/github/contributors/ha0z1/idmp)](https://github.com/ha0z1/idmp/graphs/contributors)
77
[![LICENSE](https://img.shields.io/npm/l/idmp)](https://github.com/ha0z1/idmp/blob/main/LICENSE)
8-
[![Size](https://img.shields.io/bundlephobia/minzip/idmp.svg)](https://unpkg.com/idmp/dist/)
8+
[![Size](https://img.shields.io/bundlephobia/minzip/idmp.svg)](https://cdn.jsdelivr.net/npm/idmp/+esm)
99

1010
一个优雅地解决幂等(idempotent) 函数的重复和并发调用的小库,纯函数,Gzip 后不到 1 KB
1111

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "idmp",
3-
"version": "1.9.0",
3+
"version": "1.9.1",
44
"keywords": [
55
"cache response",
66
"swr without hooks",
@@ -49,6 +49,7 @@
4949
"typescript": "^5.3.3",
5050
"vite": "^5.0.10",
5151
"vite-node": "^1.1.0",
52+
"vite-plugin-banner": "^0.7.1",
5253
"vite-plugin-dts": "^3.6.4",
5354
"vitest": "^1.1.0"
5455
}

pnpm-lock.yaml

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/build.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import { build, mergeConfig, type InlineConfig } from 'vite'
22
// import { defineConfig } from 'vite'
33
import react from '@vitejs/plugin-react-swc'
44
import dts from 'vite-plugin-dts'
5+
import banner from 'vite-plugin-banner'
6+
import { version } from '../package.json'
57

68
type DeepPartial<T> = T extends object
79
? {
@@ -12,7 +14,13 @@ const buildFile = async (buildOptions: DeepPartial<InlineConfig>) => {
1214
await build(
1315
mergeConfig(
1416
{
15-
plugins: [react(), dts()],
17+
plugins: [
18+
react(),
19+
dts(),
20+
banner(
21+
`/*! idmp v${version} | (c) github/haozi | MIT */`,
22+
),
23+
],
1624
build: {
1725
sourcemap: false,
1826
// target: "chrome51",

0 commit comments

Comments
 (0)