hw-cus-ui 1.0.16 → 1.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,70 @@
1
+ # hw-cus-ui
2
+
3
+ 一个基于 Vue 3 的组件库,包含常用的UI组件。
4
+
5
+ ## 安装
6
+
7
+ ```bash
8
+ npm install @yourname/hw-cus-ui
9
+ ```
10
+
11
+ ## 使用
12
+
13
+ ### 全局注册
14
+
15
+ ```ts
16
+ import { createApp } from 'vue'
17
+ import App from './App.vue'
18
+ import hwCusUi from '@yourname/hw-cus-ui'
19
+ import '@yourname/hw-cus-ui/dist/hw-cus-ui.css'
20
+
21
+ const app = createApp(App)
22
+
23
+ app.use(hwCusUi)
24
+ app.mount('#app')
25
+ ```
26
+
27
+ ### 按需引入
28
+
29
+ ```ts
30
+ import { createApp } from 'vue'
31
+ import App from './App.vue'
32
+ import { HwBtn } from '@yourname/hw-cus-ui'
33
+ import '@yourname/hw-cus-ui/dist/hw-cus-ui.css'
34
+
35
+ const app = createApp(App)
36
+
37
+ app.component('HwBtn', HwBtn)
38
+ app.mount('#app')
39
+ ```
40
+
41
+ ## 组件列表
42
+
43
+ - HwBtn (按钮组件)
44
+
45
+ ## 开发
46
+
47
+ ```bash
48
+ # 安装依赖
49
+ npm install
50
+
51
+ # 启动开发服务器
52
+ npm run dev
53
+
54
+ # 构建组件库
55
+ npm run build
56
+ ```
57
+
58
+ ## 发布到npm
59
+
60
+ 在发布前,请注意:
61
+
62
+ 1. 将 package.json 中的 `@yourname/hw-cus-ui` 替换为你的实际npm用户名
63
+ 2. 登录npm账户: `npm login`
64
+ 3. 确保版本号更新
65
+ 4. 运行构建命令: `npm run build`
66
+ 5. 发布: `npm publish`
67
+
68
+ ## License
69
+
70
+ MIT
package/package.json CHANGED
@@ -1,13 +1,36 @@
1
1
  {
2
2
  "name": "hw-cus-ui",
3
- "version": "1.0.16",
4
- "description": "",
5
- "main": "hw-cus-ui.es.js",
3
+ "version": "1.0.18",
4
+ "type": "module",
5
+ "main": "./dist/hw-cus-ui.es.js",
6
+ "files": [
7
+ "dist"
8
+ ],
6
9
  "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
10
+ "dev": "vite",
11
+ "build": "vue-tsc -b && vite build && vue-tsc -p tsconfig.types.json",
12
+ "preview": "vite preview",
13
+ "lib": "vue-tsc -b && vite build --mode lib"
8
14
  },
15
+ "dependencies": {
16
+ "vue": "^3.5.24"
17
+ },
18
+ "devDependencies": {
19
+ "@types/node": "^24.10.1",
20
+ "@vitejs/plugin-vue": "^6.0.1",
21
+ "@vue/tsconfig": "^0.8.1",
22
+ "typescript": "~5.9.3",
23
+ "vite": "npm:rolldown-vite@7.2.5",
24
+ "vue-tsc": "^3.1.4"
25
+ },
26
+ "resolutions": {
27
+ "vite": "npm:rolldown-vite@7.2.5"
28
+ },
29
+ "peerDependencies": {
30
+ "vue": "^3.5.24"
31
+ },
32
+ "description": "一个基于 Vue 3 的组件库,包含常用的UI组件。",
9
33
  "keywords": [],
10
34
  "author": "",
11
- "license": "ISC",
12
- "type": "commonjs"
35
+ "license": "ISC"
13
36
  }
File without changes
File without changes
File without changes
File without changes
File without changes