cc1-ui 0.0.1 → 0.0.3
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/dist/autoimport.js +5 -41
- package/dist/index.d.ts +2 -2
- package/package.json +6 -1
package/dist/autoimport.js
CHANGED
|
@@ -1,41 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.UIAuto = UIAuto;
|
|
37
|
-
const path = __importStar(require("path"));
|
|
38
|
-
const util_1 = require("./util");
|
|
1
|
+
import * as path from 'path';
|
|
2
|
+
import { readDir, readFile } from './util';
|
|
39
3
|
let btime = new Date().getTime();
|
|
40
4
|
const log = (str, time = false) => {
|
|
41
5
|
console.log('');
|
|
@@ -95,9 +59,9 @@ const getName = () => {
|
|
|
95
59
|
return names[Math.floor(Math.random() * names.length)];
|
|
96
60
|
};
|
|
97
61
|
const init = async () => {
|
|
98
|
-
await
|
|
62
|
+
await readDir(conf.src, async (location) => {
|
|
99
63
|
if (location.substring(location.length - 3) === 'vue') {
|
|
100
|
-
const ctx = await
|
|
64
|
+
const ctx = await readFile(location);
|
|
101
65
|
if (ctx) {
|
|
102
66
|
const tags = extractTags(ctx);
|
|
103
67
|
tags.forEach((tag) => {
|
|
@@ -124,7 +88,7 @@ const init = async () => {
|
|
|
124
88
|
conf.use = [...new Set(conf.use)];
|
|
125
89
|
log(`🥰🥰【${getName()}】:使用组件列表 => ${conf.use.join(',')}`);
|
|
126
90
|
};
|
|
127
|
-
function UIAuto(config) {
|
|
91
|
+
export function UIAuto(config) {
|
|
128
92
|
conf.config = config;
|
|
129
93
|
const isBuild = config.isBuild;
|
|
130
94
|
return {
|
package/dist/index.d.ts
CHANGED
|
@@ -14,12 +14,12 @@ declare module 'vue' {
|
|
|
14
14
|
export interface GlobalComponents {
|
|
15
15
|
VButton:typeof import('./components/Button/index.vue')['default']
|
|
16
16
|
VCircle:typeof import('./components/Circle/index.vue')['default']
|
|
17
|
-
VMask:typeof import('./components/Mask/index.vue')['default']
|
|
18
17
|
VIcon:typeof import('./components/Icon/index.vue')['default']
|
|
18
|
+
VMask:typeof import('./components/Mask/index.vue')['default']
|
|
19
19
|
VSIcon:typeof import('./components/SIcon/index.vue')['default']
|
|
20
|
+
VScale:typeof import('./components/Scale/index.vue')['default']
|
|
20
21
|
VSelect:typeof import('./components/Select/index.vue')['default']
|
|
21
22
|
VSwitch:typeof import('./components/Switch/index.vue')['default']
|
|
22
|
-
VScale:typeof import('./components/Scale/index.vue')['default']
|
|
23
23
|
}
|
|
24
24
|
export interface ComponentCustomProperties {
|
|
25
25
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cc1-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "我来助你-Vue3UI库",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -21,6 +21,11 @@
|
|
|
21
21
|
"import": "./dist/cc1-ui.js",
|
|
22
22
|
"require": "./dist/cc1-ui.js"
|
|
23
23
|
},
|
|
24
|
+
"./dist/autoimport": {
|
|
25
|
+
"types": "./dist/autoimport.d.ts",
|
|
26
|
+
"import": "./dist/autoimport.js",
|
|
27
|
+
"require": "./dist/autoimport.js"
|
|
28
|
+
},
|
|
24
29
|
"./index.css": "./dist/index.css"
|
|
25
30
|
},
|
|
26
31
|
"scripts": {
|