@fangzhongya/vue-components 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/README.md CHANGED
@@ -1,11 +1,148 @@
1
- # unplugin-vue-components 的 插件
1
+ # vue-components
2
+
3
+ 是自定义的 unplugin-vue-components 的 插件
2
4
 
3
5
  支持自定义解析方式
4
6
 
5
7
  支持多次配置
6
8
 
9
+ <pre>
10
+ npm i -D <b>fangzhongya/vue-components</b>
11
+ </pre>
12
+
13
+ 单个配置
14
+
15
+ ```js
16
+ import { ComponentsResolver } from '@fangzhongya/vue-components';
17
+
18
+ Components({
19
+ resolvers: [ComponentsResolver()],
20
+ });
21
+ ```
22
+
23
+ 多配置
24
+
25
+ ```js
26
+ Components({
27
+ resolvers: [
28
+ ComponentsResolver({
29
+ alias: 'cs',
30
+ /**
31
+ * 自动导入的文件目录
32
+ */
33
+ dir: './src/cs/',
34
+ matchexts: ['.vue'],
35
+ }),
36
+ ComponentsResolver({
37
+ /**
38
+ * 自动导入的文件目录
39
+ */
40
+ dir: './src/cs2/',
41
+ matchexts: ['.vue'],
42
+ }),
43
+ ],
44
+ });
45
+ ```
46
+
47
+ ### config 默认配置
48
+
49
+ ```js
50
+ const config = {
51
+ /**
52
+ * 自动导入的文件目录
53
+ */
54
+ dir: './src/components/',
55
+ /**
56
+ * 文件后缀
57
+ * 如果为空数组,
58
+ */
59
+ extensions: ['vue'],
60
+ /**
61
+ * 自己的别名
62
+ */
63
+ alias: '',
64
+ /**
65
+ * 只支持自己的别名组件,与子别名无关
66
+ */
67
+ onlyAlias: false,
68
+ /**
69
+ * 通过头匹配,默认转换成 - 模式匹配的
70
+ * dir下面子目录来配置别名
71
+ * 不区分首字母大小写
72
+ */
73
+ aliass: {},
74
+ /**
75
+ * 匹配数组
76
+ * '' 表示匹配当前文件名
77
+ */
78
+ matchs: [],
79
+ /**
80
+ * 匹配文件名称和文件类型
81
+ */
82
+ matchexts: ['.vue', '/index.vue'],
83
+
84
+ /**
85
+ * 指令文件夹名称
86
+ */
87
+ directives: 'directive',
88
+ /**
89
+ * 是否缓存
90
+ */
91
+ isCache: true,
92
+
93
+ /**
94
+ * 过滤 不匹配 通过头匹配,默认转换成 - 模式匹配的
95
+ * 不区分首字母大小写
96
+ */
97
+ startss: [
98
+ // 'router'
99
+ ],
100
+ /**
101
+ * 过滤 不匹配 全匹配 - 模式匹配的
102
+ * 不区分首字母大小写
103
+ */
104
+ filtes: ['router-link', 'router-view'],
105
+
106
+ /**
107
+ * 匹配到的文件路径
108
+ * @param {*} url
109
+ *
110
+ */
111
+ getFromName() {
112
+ return 'default';
113
+ },
114
+
115
+ /**
116
+ * 获取匹配数组
117
+ */
118
+ getMatch(v, extensions, matchs, matchexts) {
119
+ const urls = [];
120
+ if (matchs) {
121
+ matchs.forEach((key) => {
122
+ const s = '/' + v + key;
123
+ if (extensions) {
124
+ extensions.forEach((z) => {
125
+ urls.push(s + '.' + z);
126
+ });
127
+ } else {
128
+ urls.push(new RegExp(s + "\.([a-z|A-Z]+?)$"));
129
+ }
130
+ });
131
+ }
132
+ if (matchexts) {
133
+ matchexts.forEach((key) => {
134
+ urls.push('/' + v + key);
135
+ });
136
+ }
137
+ return [...new Set(urls)];
138
+ };
139
+ };
140
+ ```
141
+
142
+ ### config 配置 ts 类型
143
+
7
144
  ```ts
8
- export interface Config {
145
+ interface Config {
9
146
  /**
10
147
  * 自动导入的文件目录
11
148
  */
@@ -75,7 +212,7 @@ export interface Config {
75
212
  * 获取匹配数组
76
213
  */
77
214
  getMatch?(
78
- v: string,
215
+ name: string,
79
216
  extensions?: Array<string>,
80
217
  matchs?: Array<string>,
81
218
  matchexts?: Array<string>,
@@ -0,0 +1,60 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2
+
3
+ var _chunkYT3UEQXCcjs = require('./chunk-YT3UEQXC.cjs');
4
+
5
+
6
+
7
+ var _chunk7S65AKEKcjs = require('./chunk-7S65AKEK.cjs');
8
+
9
+ // packages/archive.ts
10
+ var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
11
+ var _path = require('path');
12
+ var archiveConfig = {
13
+ dir: "./packages/",
14
+ matchexts: ["/src/index.vue"],
15
+ urlprefix: true,
16
+ isJson: true,
17
+ jsonName: "./components.config.json"
18
+ };
19
+ function setJson(obj) {
20
+ if (obj.isJson && obj.dir) {
21
+ global._ComponentsResolverArchive_ = global._ComponentsResolverArchive_ || {};
22
+ global._ComponentsResolverArchive_[obj.dir] = obj;
23
+ if (obj.jsonName) {
24
+ let url = _path.resolve.call(void 0,
25
+ process.cwd(),
26
+ obj.jsonName
27
+ );
28
+ _fs2.default.writeFile(
29
+ url,
30
+ JSON.stringify(global._ComponentsResolverArchive_),
31
+ "utf-8",
32
+ () => {
33
+ }
34
+ );
35
+ }
36
+ }
37
+ }
38
+ function ComponentsResolverArchive(config2 = {}) {
39
+ let configs = _chunk7S65AKEKcjs.objectMerge.call(void 0, archiveConfig, config2);
40
+ configs = _chunk7S65AKEKcjs.objectMerge.call(void 0, _chunk7S65AKEKcjs.config, configs);
41
+ const fangComp = new (0, _chunkYT3UEQXCcjs.component_default)(configs);
42
+ setJson(fangComp.config);
43
+ return [
44
+ {
45
+ type: "component",
46
+ resolve: (name) => {
47
+ return fangComp.resolve(name, "component");
48
+ }
49
+ },
50
+ {
51
+ type: "directive",
52
+ resolve: (name) => {
53
+ return fangComp.resolve(name, "directive");
54
+ }
55
+ }
56
+ ];
57
+ }
58
+
59
+
60
+ exports.ComponentsResolverArchive = ComponentsResolverArchive;
@@ -0,0 +1,10 @@
1
+ import { FangConfig } from './config.js';
2
+ import { ComponentResolver } from 'unplugin-vue-components';
3
+
4
+ /**
5
+ * 自动按需匹配注册
6
+ * @returns
7
+ */
8
+ declare function ComponentsResolverArchive(config?: FangConfig): ComponentResolver[];
9
+
10
+ export { ComponentsResolverArchive };
@@ -0,0 +1,60 @@
1
+ import {
2
+ component_default
3
+ } from "./chunk-F6LEWVFD.js";
4
+ import {
5
+ config,
6
+ objectMerge
7
+ } from "./chunk-RUFNZSF3.js";
8
+
9
+ // packages/archive.ts
10
+ import fs from "fs";
11
+ import { resolve } from "path";
12
+ var archiveConfig = {
13
+ dir: "./packages/",
14
+ matchexts: ["/src/index.vue"],
15
+ urlprefix: true,
16
+ isJson: true,
17
+ jsonName: "./components.config.json"
18
+ };
19
+ function setJson(obj) {
20
+ if (obj.isJson && obj.dir) {
21
+ global._ComponentsResolverArchive_ = global._ComponentsResolverArchive_ || {};
22
+ global._ComponentsResolverArchive_[obj.dir] = obj;
23
+ if (obj.jsonName) {
24
+ let url = resolve(
25
+ process.cwd(),
26
+ obj.jsonName
27
+ );
28
+ fs.writeFile(
29
+ url,
30
+ JSON.stringify(global._ComponentsResolverArchive_),
31
+ "utf-8",
32
+ () => {
33
+ }
34
+ );
35
+ }
36
+ }
37
+ }
38
+ function ComponentsResolverArchive(config2 = {}) {
39
+ let configs = objectMerge(archiveConfig, config2);
40
+ configs = objectMerge(config, configs);
41
+ const fangComp = new component_default(configs);
42
+ setJson(fangComp.config);
43
+ return [
44
+ {
45
+ type: "component",
46
+ resolve: (name) => {
47
+ return fangComp.resolve(name, "component");
48
+ }
49
+ },
50
+ {
51
+ type: "directive",
52
+ resolve: (name) => {
53
+ return fangComp.resolve(name, "directive");
54
+ }
55
+ }
56
+ ];
57
+ }
58
+ export {
59
+ ComponentsResolverArchive
60
+ };
@@ -0,0 +1,31 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkYT3UEQXCcjs = require('./chunk-YT3UEQXC.cjs');
4
+
5
+
6
+
7
+ var _chunk7S65AKEKcjs = require('./chunk-7S65AKEK.cjs');
8
+
9
+ // packages/resolver.ts
10
+ function ComponentsResolver(config2 = {}) {
11
+ const configs = _chunk7S65AKEKcjs.objectMerge.call(void 0, _chunk7S65AKEKcjs.config, config2);
12
+ const fangComp = new (0, _chunkYT3UEQXCcjs.component_default)(configs);
13
+ return [
14
+ {
15
+ type: "component",
16
+ resolve: (name) => {
17
+ return fangComp.resolve(name, "component");
18
+ }
19
+ },
20
+ {
21
+ type: "directive",
22
+ resolve: (name) => {
23
+ return fangComp.resolve(name, "directive");
24
+ }
25
+ }
26
+ ];
27
+ }
28
+
29
+
30
+
31
+ exports.ComponentsResolver = ComponentsResolver;
@@ -1,11 +1,20 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
- var _chunkGCY6HHVLcjs = require('./chunk-GCY6HHVL.cjs');
4
-
5
-
6
- var _chunkDWAXBT53cjs = require('./chunk-DWAXBT53.cjs');
7
-
8
- // packages/resolver.ts
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/config.ts
2
+ var config = {
3
+ dir: "./src/components/",
4
+ extensions: ["vue"],
5
+ alias: "",
6
+ onlyAlias: false,
7
+ aliass: {},
8
+ matchs: [],
9
+ matchexts: [".vue", "/index.vue"],
10
+ directives: "directive",
11
+ isCache: true,
12
+ startss: [],
13
+ filtes: ["router-link", "router-view"],
14
+ getFromName() {
15
+ return "default";
16
+ }
17
+ };
9
18
  function objectMerge(a, b, j = 1, i) {
10
19
  for (const key in b) {
11
20
  const v = a[key];
@@ -43,25 +52,8 @@ function objectMerge(a, b, j = 1, i) {
43
52
  }
44
53
  return a;
45
54
  }
46
- function ComponentsResolver(con = {}) {
47
- const configs = objectMerge(_chunkGCY6HHVLcjs.config, con);
48
- const fangComp = new (0, _chunkDWAXBT53cjs.fang_component_default)(configs);
49
- return [
50
- {
51
- type: "component",
52
- resolve: (name) => {
53
- return fangComp.resolve(name, "component");
54
- }
55
- },
56
- {
57
- type: "directive",
58
- resolve: (name) => {
59
- return fangComp.resolve(name, "directive");
60
- }
61
- }
62
- ];
63
- }
64
55
 
65
56
 
66
57
 
67
- exports.ComponentsResolver = ComponentsResolver;
58
+
59
+ exports.config = config; exports.objectMerge = objectMerge;
@@ -1,4 +1,4 @@
1
- // packages/fang-component.ts
1
+ // packages/component.ts
2
2
  import fastGlob from "fast-glob";
3
3
  import { resolve } from "path";
4
4
  function firstUpper(vs) {
@@ -115,7 +115,7 @@ var FangComponent = class {
115
115
  this.#cacheObj = {};
116
116
  this.#curDir = "";
117
117
  if (this.config.dir) {
118
- this.#curDir = resolve(__dirname, this.config.dir).replace(/\\/g, "/") + "/";
118
+ this.#curDir = resolve(process.cwd(), this.config.dir).replace(/\\/g, "/") + "/";
119
119
  }
120
120
  this.#aliassArr = [];
121
121
  const aliass = this.config.aliass;
@@ -423,8 +423,8 @@ var FangComponent = class {
423
423
  }
424
424
  }
425
425
  };
426
- var fang_component_default = FangComponent;
426
+ var component_default = FangComponent;
427
427
 
428
428
  export {
429
- fang_component_default
429
+ component_default
430
430
  };
@@ -0,0 +1,31 @@
1
+ import {
2
+ component_default
3
+ } from "./chunk-F6LEWVFD.js";
4
+ import {
5
+ config,
6
+ objectMerge
7
+ } from "./chunk-RUFNZSF3.js";
8
+
9
+ // packages/resolver.ts
10
+ function ComponentsResolver(config2 = {}) {
11
+ const configs = objectMerge(config, config2);
12
+ const fangComp = new component_default(configs);
13
+ return [
14
+ {
15
+ type: "component",
16
+ resolve: (name) => {
17
+ return fangComp.resolve(name, "component");
18
+ }
19
+ },
20
+ {
21
+ type: "directive",
22
+ resolve: (name) => {
23
+ return fangComp.resolve(name, "directive");
24
+ }
25
+ }
26
+ ];
27
+ }
28
+
29
+ export {
30
+ ComponentsResolver
31
+ };
@@ -1,11 +1,20 @@
1
- import {
2
- config
3
- } from "./chunk-LOIJYJZQ.js";
4
- import {
5
- fang_component_default
6
- } from "./chunk-SYAIFHVF.js";
7
-
8
- // packages/resolver.ts
1
+ // packages/config.ts
2
+ var config = {
3
+ dir: "./src/components/",
4
+ extensions: ["vue"],
5
+ alias: "",
6
+ onlyAlias: false,
7
+ aliass: {},
8
+ matchs: [],
9
+ matchexts: [".vue", "/index.vue"],
10
+ directives: "directive",
11
+ isCache: true,
12
+ startss: [],
13
+ filtes: ["router-link", "router-view"],
14
+ getFromName() {
15
+ return "default";
16
+ }
17
+ };
9
18
  function objectMerge(a, b, j = 1, i) {
10
19
  for (const key in b) {
11
20
  const v = a[key];
@@ -43,25 +52,8 @@ function objectMerge(a, b, j = 1, i) {
43
52
  }
44
53
  return a;
45
54
  }
46
- function ComponentsResolver(con = {}) {
47
- const configs = objectMerge(config, con);
48
- const fangComp = new fang_component_default(configs);
49
- return [
50
- {
51
- type: "component",
52
- resolve: (name) => {
53
- return fangComp.resolve(name, "component");
54
- }
55
- },
56
- {
57
- type: "directive",
58
- resolve: (name) => {
59
- return fangComp.resolve(name, "directive");
60
- }
61
- }
62
- ];
63
- }
64
55
 
65
56
  export {
66
- ComponentsResolver
57
+ config,
58
+ objectMerge
67
59
  };
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// packages/fang-component.ts
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// packages/component.ts
2
2
  var _fastglob = require('fast-glob'); var _fastglob2 = _interopRequireDefault(_fastglob);
3
3
  var _path = require('path');
4
4
  function firstUpper(vs) {
@@ -115,7 +115,7 @@ var FangComponent = class {
115
115
  this.#cacheObj = {};
116
116
  this.#curDir = "";
117
117
  if (this.config.dir) {
118
- this.#curDir = _path.resolve.call(void 0, __dirname, this.config.dir).replace(/\\/g, "/") + "/";
118
+ this.#curDir = _path.resolve.call(void 0, process.cwd(), this.config.dir).replace(/\\/g, "/") + "/";
119
119
  }
120
120
  this.#aliassArr = [];
121
121
  const aliass = this.config.aliass;
@@ -423,8 +423,8 @@ var FangComponent = class {
423
423
  }
424
424
  }
425
425
  };
426
- var fang_component_default = FangComponent;
426
+ var component_default = FangComponent;
427
427
 
428
428
 
429
429
 
430
- exports.fang_component_default = fang_component_default;
430
+ exports.component_default = component_default;
@@ -0,0 +1,6 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunkYT3UEQXCcjs = require('./chunk-YT3UEQXC.cjs');
4
+
5
+
6
+ exports.default = _chunkYT3UEQXCcjs.component_default;
File without changes
@@ -0,0 +1,6 @@
1
+ import {
2
+ component_default
3
+ } from "./chunk-F6LEWVFD.js";
4
+ export {
5
+ component_default as default
6
+ };
package/dist/config.cjs CHANGED
@@ -1,6 +1,8 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkGCY6HHVLcjs = require('./chunk-GCY6HHVL.cjs');
4
3
 
4
+ var _chunk7S65AKEKcjs = require('./chunk-7S65AKEK.cjs');
5
5
 
6
- exports.config = _chunkGCY6HHVLcjs.config;
6
+
7
+
8
+ exports.config = _chunk7S65AKEKcjs.config; exports.objectMerge = _chunk7S65AKEKcjs.objectMerge;
package/dist/config.d.ts CHANGED
@@ -46,6 +46,10 @@ interface Config {
46
46
  * 不区分首字母大小写
47
47
  */
48
48
  startss?: Array<string>;
49
+ /**
50
+ * 过滤 不匹配 全匹配 - 模式匹配的
51
+ * 不区分首字母大小写
52
+ */
49
53
  filtes?: Array<string>;
50
54
  /**
51
55
  * 匹配到的文件路径
@@ -54,7 +58,7 @@ interface Config {
54
58
  /**
55
59
  * 获取匹配数组
56
60
  */
57
- getMatch?(v: string, extensions?: Array<string>, matchs?: Array<string>, matchexts?: Array<string>): Array<string | RegExp>;
61
+ getMatch?(name: string, extensions?: Array<string>, matchs?: Array<string>, matchexts?: Array<string>): Array<string | RegExp>;
58
62
  }
59
63
  interface FangConfig extends Config {
60
64
  /**
@@ -65,6 +69,10 @@ interface FangConfig extends Config {
65
69
  * 是否生成json 配置文件
66
70
  */
67
71
  isJson?: boolean;
72
+ /**
73
+ * 生成json 配置文件名称
74
+ */
75
+ jsonName?: string;
68
76
  /**
69
77
  * 格式化的组件的地址
70
78
  */
@@ -74,6 +82,15 @@ interface FangConfig extends Config {
74
82
  */
75
83
  dirUrls?: Array<string>;
76
84
  }
77
- declare const config: Config;
85
+ declare const config: Config;
86
+ /**
87
+ * 合并两个对象的值
88
+ * @param a 合并到的对象
89
+ * @param b 合并对象
90
+ * @param j 合并级别
91
+ * @param i 是否合并数组
92
+ * @returns 合并的对象
93
+ */
94
+ declare function objectMerge<T>(a: T, b: T, j?: number, i?: boolean): T;
78
95
 
79
- export { Config, FangConfig, config };
96
+ export { Config, FangConfig, config, objectMerge };
package/dist/config.js CHANGED
@@ -1,6 +1,8 @@
1
1
  import {
2
- config
3
- } from "./chunk-LOIJYJZQ.js";
2
+ config,
3
+ objectMerge
4
+ } from "./chunk-RUFNZSF3.js";
4
5
  export {
5
- config
6
+ config,
7
+ objectMerge
6
8
  };
package/dist/index.cjs CHANGED
@@ -1,15 +1,15 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkFHXKMI4Fcjs = require('./chunk-FHXKMI4F.cjs');
4
- require('./chunk-GCY6HHVL.cjs');
3
+ var _chunk76SLYNZUcjs = require('./chunk-76SLYNZU.cjs');
5
4
 
6
5
 
7
- var _chunkDWAXBT53cjs = require('./chunk-DWAXBT53.cjs');
6
+ var _chunkYT3UEQXCcjs = require('./chunk-YT3UEQXC.cjs');
7
+ require('./chunk-7S65AKEK.cjs');
8
8
 
9
9
  // packages/index.ts
10
- var FangComponent = class extends _chunkDWAXBT53cjs.fang_component_default {
10
+ var FangComponent = class extends _chunkYT3UEQXCcjs.component_default {
11
11
  };
12
12
 
13
13
 
14
14
 
15
- exports.ComponentsResolver = _chunkFHXKMI4Fcjs.ComponentsResolver; exports.FangComponent = FangComponent;
15
+ exports.ComponentsResolver = _chunk76SLYNZUcjs.ComponentsResolver; exports.FangComponent = FangComponent;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import FangComponent$1 from './fang-component.js';
1
+ import FangComponent$1 from './component.js';
2
2
  export { Config } from './config.js';
3
3
  export { ComponentsResolver } from './resolver.js';
4
4
  import 'unplugin-vue-components';
package/dist/index.js CHANGED
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  ComponentsResolver
3
- } from "./chunk-ZDQS7PSJ.js";
4
- import "./chunk-LOIJYJZQ.js";
3
+ } from "./chunk-OV35K52G.js";
5
4
  import {
6
- fang_component_default
7
- } from "./chunk-SYAIFHVF.js";
5
+ component_default
6
+ } from "./chunk-F6LEWVFD.js";
7
+ import "./chunk-RUFNZSF3.js";
8
8
 
9
9
  // packages/index.ts
10
- var FangComponent = class extends fang_component_default {
10
+ var FangComponent = class extends component_default {
11
11
  };
12
12
  export {
13
13
  ComponentsResolver,
package/dist/resolver.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkFHXKMI4Fcjs = require('./chunk-FHXKMI4F.cjs');
4
- require('./chunk-GCY6HHVL.cjs');
5
- require('./chunk-DWAXBT53.cjs');
3
+ var _chunk76SLYNZUcjs = require('./chunk-76SLYNZU.cjs');
4
+ require('./chunk-YT3UEQXC.cjs');
5
+ require('./chunk-7S65AKEK.cjs');
6
6
 
7
7
 
8
- exports.ComponentsResolver = _chunkFHXKMI4Fcjs.ComponentsResolver;
8
+ exports.ComponentsResolver = _chunk76SLYNZUcjs.ComponentsResolver;
@@ -5,6 +5,6 @@ import { ComponentResolver } from 'unplugin-vue-components';
5
5
  * 自动按需匹配注册
6
6
  * @returns
7
7
  */
8
- declare function ComponentsResolver(con?: Config): ComponentResolver[];
8
+ declare function ComponentsResolver(config?: Config): ComponentResolver[];
9
9
 
10
10
  export { ComponentsResolver };
package/dist/resolver.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  ComponentsResolver
3
- } from "./chunk-ZDQS7PSJ.js";
4
- import "./chunk-LOIJYJZQ.js";
5
- import "./chunk-SYAIFHVF.js";
3
+ } from "./chunk-OV35K52G.js";
4
+ import "./chunk-F6LEWVFD.js";
5
+ import "./chunk-RUFNZSF3.js";
6
6
  export {
7
7
  ComponentsResolver
8
8
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fangzhongya/vue-components",
3
3
  "private": false,
4
- "version": "0.0.1",
4
+ "version": "0.0.3",
5
5
  "type": "module",
6
6
  "description ": "unplugin-vue-components插件",
7
7
  "author": "fangzhongya ",
@@ -37,9 +37,7 @@
37
37
  "registry": "https://registry.npmjs.org/"
38
38
  },
39
39
  "scripts": {
40
- "dev": "vite",
41
- "build": "tsc && vite build",
42
- "build:tsup": "tsup",
40
+ "build": "tsup",
43
41
  "preview": "vite preview",
44
42
  "test": "vitest test"
45
43
  },
@@ -1,21 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/config.ts
2
- var config = {
3
- dir: "./src/components/",
4
- extensions: ["vue"],
5
- alias: "",
6
- onlyAlias: false,
7
- aliass: {},
8
- matchs: [],
9
- matchexts: [".vue", "/index.vue"],
10
- directives: "directive",
11
- isCache: true,
12
- startss: [],
13
- filtes: ["router-link", "router-view"],
14
- getFromName() {
15
- return "default";
16
- }
17
- };
18
-
19
-
20
-
21
- exports.config = config;
@@ -1,21 +0,0 @@
1
- // packages/config.ts
2
- var config = {
3
- dir: "./src/components/",
4
- extensions: ["vue"],
5
- alias: "",
6
- onlyAlias: false,
7
- aliass: {},
8
- matchs: [],
9
- matchexts: [".vue", "/index.vue"],
10
- directives: "directive",
11
- isCache: true,
12
- startss: [],
13
- filtes: ["router-link", "router-view"],
14
- getFromName() {
15
- return "default";
16
- }
17
- };
18
-
19
- export {
20
- config
21
- };
@@ -1,6 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
- var _chunkDWAXBT53cjs = require('./chunk-DWAXBT53.cjs');
4
-
5
-
6
- exports.default = _chunkDWAXBT53cjs.fang_component_default;
@@ -1,6 +0,0 @@
1
- import {
2
- fang_component_default
3
- } from "./chunk-SYAIFHVF.js";
4
- export {
5
- fang_component_default as default
6
- };