v3-comf-dm 1.0.0 → 1.0.1

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.
Files changed (2) hide show
  1. package/README.md +10 -36
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,24 +1,24 @@
1
1
  # Vue Component Library
2
2
 
3
- 一个支持 Vue2 和 Vue3 的组件库项目。
3
+ 一个基于 **Vue3** 的组件库项目。
4
4
 
5
5
  ## 特性
6
6
 
7
7
  - ✅ 使用 Vue3 语法开发
8
- - ✅ 支持打包为 Vue2 和 Vue3 两个版本
9
8
  - ✅ 支持 npm 发布(可配置公有/私有源)
10
9
  - ✅ 支持代码复制使用(低耦合设计)
11
10
  - ✅ 集成 Vitest 测试框架
12
11
  - ✅ 自动样式兼容(Autoprefixer)
13
12
  - ✅ TypeScript 支持
14
13
  - ✅ 完整的类型定义
14
+ - ✅ 内置示例:`examples/vue3-example`
15
15
 
16
16
  ## 安装
17
17
 
18
18
  ### npm 安装
19
19
 
20
20
  ```bash
21
- npm install @your-org/vue-component-library
21
+ npm install v3-comf-dm
22
22
  ```
23
23
 
24
24
  ### 使用
@@ -28,34 +28,24 @@ npm install @your-org/vue-component-library
28
28
  ```typescript
29
29
  import { createApp } from 'vue'
30
30
  import App from './App.vue'
31
- import VueComponentLibrary from '@your-org/vue-component-library'
32
- import '@your-org/vue-component-library/style'
31
+ import VueComponentLibrary from 'v3-comf-dm'
32
+ import 'v3-comf-dm/style'
33
33
 
34
34
  const app = createApp(App)
35
35
  app.use(VueComponentLibrary)
36
36
  app.mount('#app')
37
37
  ```
38
38
 
39
- #### Vue2 项目
40
-
41
- ```typescript
42
- import Vue from 'vue'
43
- import VueComponentLibrary from '@your-org/vue-component-library/vue2'
44
- import '@your-org/vue-component-library/vue2/style'
45
-
46
- Vue.use(VueComponentLibrary)
47
- ```
48
-
49
39
  #### 按需引入
50
40
 
51
41
  ```typescript
52
- import { Button, Card } from '@your-org/vue-component-library'
42
+ import { ScaleContainer, ImageCropper } from 'v3-comf-dm'
53
43
 
54
44
  // 在组件中使用
55
45
  export default {
56
46
  components: {
57
- Button,
58
- Card
47
+ ScaleContainer,
48
+ ImageCropper
59
49
  }
60
50
  }
61
51
  ```
@@ -77,14 +67,8 @@ npm run dev
77
67
  ### 构建
78
68
 
79
69
  ```bash
80
- # 构建 Vue3 和 Vue2 版本
70
+ # 构建
81
71
  npm run build
82
-
83
- # 只构建 Vue3 版本
84
- npm run build:vue3
85
-
86
- # 只构建 Vue2 版本
87
- npm run build:vue2
88
72
  ```
89
73
 
90
74
  ### 测试
@@ -108,15 +92,6 @@ npm run test:coverage
108
92
  npm run publish:npm
109
93
  ```
110
94
 
111
- ### 发布到私有源
112
-
113
- 1. 修改 `.npmrc` 文件,配置私有源地址
114
- 2. 运行:
115
-
116
- ```bash
117
- npm run publish:private
118
- ```
119
-
120
95
  ## 组件开发规范
121
96
 
122
97
  ### 1. 组件结构
@@ -164,8 +139,7 @@ vue-component-library/
164
139
  │ └── index.ts # 入口文件
165
140
  ├── examples/ # 示例项目
166
141
  ├── tests/ # 测试文件
167
- ├── dist/ # 构建输出(Vue3)
168
- ├── dist-vue2/ # 构建输出(Vue2)
142
+ ├── dist/ # 构建输出
169
143
  └── vite.config.ts # Vite 配置
170
144
  ```
171
145
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "v3-comf-dm",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "A Vue3 component library",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",