hfn-components 0.0.4 → 0.0.5

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/component.ts ADDED
@@ -0,0 +1,10 @@
1
+ import { HtTable } from '@hfn-components/components/table'
2
+ import { HtButton } from '@hfn-components/components/button'
3
+
4
+
5
+ import type { Plugin } from 'vue'
6
+
7
+ export default [
8
+ HtTable,
9
+ HtButton
10
+ ] as Plugin[]
package/defaults.ts ADDED
@@ -0,0 +1,6 @@
1
+ import { makeInstaller } from './make-installer'
2
+ import Components from './component'
3
+ import Plugins from './plugin'
4
+
5
+
6
+ export default makeInstaller([...Components, ...Plugins])
package/index.ts ADDED
@@ -0,0 +1,7 @@
1
+ import installer from './defaults'
2
+ export * from './make-installer'
3
+ export * from '@hfn-components/components'
4
+
5
+
6
+ export const install = installer.install
7
+ export default installer
@@ -0,0 +1,17 @@
1
+ import type { App, Plugin } from 'vue'
2
+ import { INSTALLED_KEY } from '@hfn-components/constants'
3
+
4
+ export const makeInstaller = (components: Plugin[] = []) => {
5
+ const install = (app: App) => {
6
+ if (app[INSTALLED_KEY]) return
7
+
8
+ app[INSTALLED_KEY] = true
9
+ components.forEach((c) => app.use(c))
10
+
11
+ // if (options) provideGlobalConfig(options, app, true)
12
+ }
13
+
14
+ return {
15
+ install
16
+ }
17
+ }
package/package.json CHANGED
@@ -1,22 +1,17 @@
1
1
  {
2
2
  "name": "hfn-components",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "",
5
- "main": "dist/es/packages/components/index.mjs",
5
+ "main": "index.ts",
6
+ "module": "es/index.mjs",
7
+ "types": "es/index.d.ts",
6
8
  "scripts": {
7
9
  "test": "echo \"Error: no test specified\" && exit 1"
8
10
  },
9
- "files": [
10
- "dist/"
11
- ],
12
11
  "keywords": [],
13
12
  "author": "",
14
13
  "license": "ISC",
15
- "devDependencies": {
16
- "ant-design-vue": "3.2.20",
17
- "typescript": "^5.3.3"
18
- },
19
14
  "peerDependencies": {
20
- "vue": "3.4.21"
15
+ "vue": "^3.2.0"
21
16
  }
22
17
  }
package/plugin.ts ADDED
@@ -0,0 +1 @@
1
+ export default []
package/README.en.md DELETED
@@ -1,36 +0,0 @@
1
- # ht
2
-
3
- #### Description
4
- ht-test
5
-
6
- #### Software Architecture
7
- Software architecture description
8
-
9
- #### Installation
10
-
11
- 1. xxxx
12
- 2. xxxx
13
- 3. xxxx
14
-
15
- #### Instructions
16
-
17
- 1. xxxx
18
- 2. xxxx
19
- 3. xxxx
20
-
21
- #### Contribution
22
-
23
- 1. Fork the repository
24
- 2. Create Feat_xxx branch
25
- 3. Commit your code
26
- 4. Create Pull Request
27
-
28
-
29
- #### Gitee Feature
30
-
31
- 1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
32
- 2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
33
- 3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
34
- 4. The most valuable open source project [GVP](https://gitee.com/gvp)
35
- 5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
36
- 6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
package/README.md DELETED
@@ -1,4 +0,0 @@
1
- # ht
2
-
3
- #### 介绍
4
- 好投科技组件库
@@ -1,9 +0,0 @@
1
- var _export_sfc = (sfc, props) => {
2
- const target = sfc.__vccOpts || sfc;
3
- for (const [key, val] of props) {
4
- target[key] = val;
5
- }
6
- return target;
7
- };
8
-
9
- export { _export_sfc as default };