zhihao-ui 1.1.6 → 1.2.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.
- package/package.json +21 -1
- package/componens.ts +0 -41
- package/index.ts +0 -7
- package/vite.es.config.ts +0 -62
- package/vite.umd.config.ts +0 -54
package/package.json
CHANGED
|
@@ -1,8 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zhihao-ui",
|
|
3
|
-
"version": "1.1
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "components",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"main": "./dist/umd/index.umd.cjs",
|
|
7
|
+
"module": "./dist/es/index.js",
|
|
8
|
+
"types": "./dist/types/core/index.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"import": "./dist/es/index.js",
|
|
15
|
+
"require": "./dist/umd/index.umd.cjs",
|
|
16
|
+
"types": "./dist/types/core/index.d.ts"
|
|
17
|
+
},
|
|
18
|
+
"./dist/": {
|
|
19
|
+
"import": "./dist/",
|
|
20
|
+
"require": "./dist/"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"sideEffects": [
|
|
24
|
+
"./dist/index.css"
|
|
25
|
+
],
|
|
6
26
|
|
|
7
27
|
"scripts": {
|
|
8
28
|
"build": "run-s build-only move-style",
|
package/componens.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import type { Plugin } from "vue"
|
|
2
|
-
import {
|
|
3
|
-
ZhBaseInfo,
|
|
4
|
-
ZhButton,
|
|
5
|
-
ZhDatePicker,
|
|
6
|
-
ZhDetailHeader,
|
|
7
|
-
ZhDetailSubTitle,
|
|
8
|
-
ZhDialog,
|
|
9
|
-
ZhEditInfoPair,
|
|
10
|
-
ZhFileWrapper,
|
|
11
|
-
ZhGrid,
|
|
12
|
-
ZhInfoPair,
|
|
13
|
-
ZhInput,
|
|
14
|
-
ZhInputNumber,
|
|
15
|
-
ZhLoading,
|
|
16
|
-
ZhMessageBox,
|
|
17
|
-
ZhMoneyInput,
|
|
18
|
-
ZhPageHeadPanel,
|
|
19
|
-
ZhToolTips
|
|
20
|
-
} from "../components";
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
export default [
|
|
24
|
-
ZhBaseInfo,
|
|
25
|
-
ZhButton,
|
|
26
|
-
ZhDatePicker,
|
|
27
|
-
ZhDetailHeader,
|
|
28
|
-
ZhDetailSubTitle,
|
|
29
|
-
ZhDialog,
|
|
30
|
-
ZhEditInfoPair,
|
|
31
|
-
ZhFileWrapper,
|
|
32
|
-
ZhGrid,
|
|
33
|
-
ZhInfoPair,
|
|
34
|
-
ZhInput,
|
|
35
|
-
ZhInputNumber,
|
|
36
|
-
ZhLoading,
|
|
37
|
-
ZhMessageBox,
|
|
38
|
-
ZhMoneyInput,
|
|
39
|
-
ZhPageHeadPanel,
|
|
40
|
-
ZhToolTips
|
|
41
|
-
] as Plugin[]
|
package/index.ts
DELETED
package/vite.es.config.ts
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from 'vite';
|
|
2
|
-
import vue from '@vitejs/plugin-vue';
|
|
3
|
-
import { resolve } from 'path';
|
|
4
|
-
import { readdirSync } from 'fs';
|
|
5
|
-
import dts from 'vite-plugin-dts';
|
|
6
|
-
import { filter, map } from 'lodash-es';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
function getDirectoriesSync(basePath: string) {
|
|
10
|
-
const entries = readdirSync(basePath, { withFileTypes: true });
|
|
11
|
-
return map(
|
|
12
|
-
filter(entries, (entry) => entry.isDirectory()),
|
|
13
|
-
(entry) => entry.name
|
|
14
|
-
);
|
|
15
|
-
}
|
|
16
|
-
export default defineConfig({
|
|
17
|
-
plugins: [vue(), dts({
|
|
18
|
-
tsconfigPath: "../../tsconfig.build.json",
|
|
19
|
-
outDir: "dist/types"
|
|
20
|
-
})],
|
|
21
|
-
build: {
|
|
22
|
-
outDir: "dist/es",
|
|
23
|
-
lib: {
|
|
24
|
-
entry: resolve(__dirname, './index.ts'),
|
|
25
|
-
name: "ZhihaoUI",
|
|
26
|
-
fileName: "index",
|
|
27
|
-
formats: ['es']
|
|
28
|
-
},
|
|
29
|
-
rollupOptions: {
|
|
30
|
-
external: [
|
|
31
|
-
'vue',
|
|
32
|
-
"@fortawesome/fontawesome-svg-core",
|
|
33
|
-
"@fortawesome/free-solid-svg-icons",
|
|
34
|
-
"@fortawesome/vue-fontawesome",
|
|
35
|
-
"@popperjs/core",
|
|
36
|
-
"async-validator"
|
|
37
|
-
],
|
|
38
|
-
output: {
|
|
39
|
-
assetFileNames: (assetInfo) => {
|
|
40
|
-
if (assetInfo.name === 'style.css') return "index.css"
|
|
41
|
-
return assetInfo.name as string
|
|
42
|
-
},
|
|
43
|
-
manualChunks: (id) => {
|
|
44
|
-
if (id.includes('node_modules')) {
|
|
45
|
-
return "vendor"
|
|
46
|
-
}
|
|
47
|
-
if (id.includes('/packages/hooks')) {
|
|
48
|
-
return "hooks"
|
|
49
|
-
}
|
|
50
|
-
if (id.includes('/packages/utils')) {
|
|
51
|
-
return "utils"
|
|
52
|
-
}
|
|
53
|
-
for (const item of getDirectoriesSync("../components")) {
|
|
54
|
-
if (id.includes(`/packages/components/${item}`)) {
|
|
55
|
-
return item
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
}
|
|
62
|
-
});
|
package/vite.umd.config.ts
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from 'vite';
|
|
2
|
-
import vue from '@vitejs/plugin-vue';
|
|
3
|
-
import { resolve } from 'path';
|
|
4
|
-
import dts from 'vite-plugin-dts';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const COMP_NAMES = ['button', 'icon', 'input'];
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export default defineConfig({
|
|
12
|
-
plugins: [vue(), dts({
|
|
13
|
-
tsconfigPath: "../../tsconfig.build.json",
|
|
14
|
-
outDir: "dist/types"
|
|
15
|
-
})],
|
|
16
|
-
build: {
|
|
17
|
-
outDir: "dist/umd",
|
|
18
|
-
lib: {
|
|
19
|
-
entry: resolve(__dirname, './index.ts'),
|
|
20
|
-
name: "ZhihaoUI",
|
|
21
|
-
fileName: "index",
|
|
22
|
-
formats: ['umd']
|
|
23
|
-
},
|
|
24
|
-
rollupOptions: {
|
|
25
|
-
external: ['vue'],
|
|
26
|
-
output: {
|
|
27
|
-
exports: "named",
|
|
28
|
-
globals: {
|
|
29
|
-
vue: 'Vue'
|
|
30
|
-
},
|
|
31
|
-
assetFileNames: (assetInfo) => {
|
|
32
|
-
if (assetInfo.name === 'style.css') return "index.css"
|
|
33
|
-
return assetInfo.name as string
|
|
34
|
-
},
|
|
35
|
-
// manualChunks: (id) => {
|
|
36
|
-
// if (id.includes('node_modules')) {
|
|
37
|
-
// return "vendor"
|
|
38
|
-
// }
|
|
39
|
-
// if (id.includes('/packages/hooks')) {
|
|
40
|
-
// return "hooks"
|
|
41
|
-
// }
|
|
42
|
-
// if (id.includes('/packages/utils')) {
|
|
43
|
-
// return "utils"
|
|
44
|
-
// }
|
|
45
|
-
// for (const item of COMP_NAMES) {
|
|
46
|
-
// if (id.includes(`/packages/components/${item}`)) {
|
|
47
|
-
// return item
|
|
48
|
-
// }
|
|
49
|
-
// }
|
|
50
|
-
// },
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
}
|
|
54
|
-
});
|