@fangzhongya/vue-components 0.0.8 → 0.0.9

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.
@@ -1,14 +1,14 @@
1
- import {
2
- component_default
3
- } from "./chunk-3OV2MAKS.mjs";
4
- import {
5
- config,
6
- objectMerge
7
- } from "./chunk-37Q6ZQUD.mjs";
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
8
 
9
9
  // packages/archive.ts
10
- import { writeFile } from "node:fs";
11
- import { resolve } from "node:path";
10
+ var _fs = require('fs');
11
+ var _path = require('path');
12
12
  var archiveConfig = {
13
13
  dir: "./packages/",
14
14
  matchexts: ["/src/index.vue"],
@@ -21,11 +21,11 @@ function setJson(obj) {
21
21
  global._ComponentsResolverArchive_ = global._ComponentsResolverArchive_ || {};
22
22
  global._ComponentsResolverArchive_[obj.dir] = obj;
23
23
  if (obj.jsonName) {
24
- let url = resolve(
24
+ let url = _path.resolve.call(void 0,
25
25
  process.cwd(),
26
26
  obj.jsonName
27
27
  );
28
- writeFile(
28
+ _fs.writeFile.call(void 0,
29
29
  url,
30
30
  JSON.stringify(global._ComponentsResolverArchive_),
31
31
  "utf-8",
@@ -36,8 +36,8 @@ function setJson(obj) {
36
36
  }
37
37
  }
38
38
  function ComponentsResolverArchive(config2 = {}) {
39
- const configs = objectMerge(config, archiveConfig, 2, true);
40
- const fangComp = new component_default(objectMerge(configs, config2));
39
+ const configs = _chunk7S65AKEKcjs.objectMerge.call(void 0, _chunk7S65AKEKcjs.config, archiveConfig, 2, true);
40
+ const fangComp = new (0, _chunkYT3UEQXCcjs.component_default)(_chunk7S65AKEKcjs.objectMerge.call(void 0, configs, config2));
41
41
  setJson(fangComp.config);
42
42
  return [
43
43
  {
@@ -54,6 +54,6 @@ function ComponentsResolverArchive(config2 = {}) {
54
54
  }
55
55
  ];
56
56
  }
57
- export {
58
- ComponentsResolverArchive
59
- };
57
+
58
+
59
+ exports.ComponentsResolverArchive = ComponentsResolverArchive;
package/dist/archive.js CHANGED
@@ -1,14 +1,14 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
- var _chunkF6LEWVFDjs = require('./chunk-F6LEWVFD.js');
4
-
5
-
6
-
7
- var _chunkRUFNZSF3js = require('./chunk-RUFNZSF3.js');
1
+ import {
2
+ component_default
3
+ } from "./chunk-F6LEWVFD.js";
4
+ import {
5
+ config,
6
+ objectMerge
7
+ } from "./chunk-RUFNZSF3.js";
8
8
 
9
9
  // packages/archive.ts
10
- var _fs = require('fs');
11
- var _path = require('path');
10
+ import { writeFile } from "node:fs";
11
+ import { resolve } from "node:path";
12
12
  var archiveConfig = {
13
13
  dir: "./packages/",
14
14
  matchexts: ["/src/index.vue"],
@@ -21,11 +21,11 @@ function setJson(obj) {
21
21
  global._ComponentsResolverArchive_ = global._ComponentsResolverArchive_ || {};
22
22
  global._ComponentsResolverArchive_[obj.dir] = obj;
23
23
  if (obj.jsonName) {
24
- let url = _path.resolve.call(void 0,
24
+ let url = resolve(
25
25
  process.cwd(),
26
26
  obj.jsonName
27
27
  );
28
- _fs.writeFile.call(void 0,
28
+ writeFile(
29
29
  url,
30
30
  JSON.stringify(global._ComponentsResolverArchive_),
31
31
  "utf-8",
@@ -36,8 +36,8 @@ function setJson(obj) {
36
36
  }
37
37
  }
38
38
  function ComponentsResolverArchive(config2 = {}) {
39
- const configs = _chunkRUFNZSF3js.objectMerge.call(void 0, _chunkRUFNZSF3js.config, archiveConfig, 2, true);
40
- const fangComp = new (0, _chunkF6LEWVFDjs.component_default)(_chunkRUFNZSF3js.objectMerge.call(void 0, configs, config2));
39
+ const configs = objectMerge(config, archiveConfig, 2, true);
40
+ const fangComp = new component_default(objectMerge(configs, config2));
41
41
  setJson(fangComp.config);
42
42
  return [
43
43
  {
@@ -54,6 +54,6 @@ function ComponentsResolverArchive(config2 = {}) {
54
54
  }
55
55
  ];
56
56
  }
57
-
58
-
59
- exports.ComponentsResolverArchive = ComponentsResolverArchive;
57
+ export {
58
+ ComponentsResolverArchive
59
+ };
@@ -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,4 +1,4 @@
1
- // packages/config.ts
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/config.ts
2
2
  var config = {
3
3
  dir: "./src/components/",
4
4
  extensions: ["vue"],
@@ -53,7 +53,7 @@ function objectMerge(a, b, j = 1, i) {
53
53
  return a;
54
54
  }
55
55
 
56
- export {
57
- config,
58
- objectMerge
59
- };
56
+
57
+
58
+
59
+ exports.config = config; exports.objectMerge = objectMerge;
@@ -1,6 +1,6 @@
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
- var _fastglob = require('fast-glob'); var _fastglob2 = _interopRequireDefault(_fastglob);
3
- var _path = require('path');
1
+ // packages/component.ts
2
+ import fastGlob from "fast-glob";
3
+ import { resolve } from "path";
4
4
  function firstUpper(vs) {
5
5
  return vs.slice(0, 1).toUpperCase() + vs.slice(1);
6
6
  }
@@ -97,7 +97,7 @@ function getName(name) {
97
97
  }
98
98
  }
99
99
  var FangComponent = class {
100
-
100
+ config;
101
101
  #comUrls;
102
102
  #dirUrls;
103
103
  #cacheObj;
@@ -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, process.cwd(), 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;
@@ -135,9 +135,9 @@ var FangComponent = class {
135
135
  matchs.forEach((key) => {
136
136
  const s = "/" + v + key;
137
137
  if (extensions) {
138
- _optionalChain([extensions, 'optionalAccess', _ => _.forEach, 'call', _2 => _2((z) => {
138
+ extensions?.forEach((z) => {
139
139
  urls.push(s + "." + z);
140
- })]);
140
+ });
141
141
  } else {
142
142
  const reg = new RegExp(s + ".([a-z|A-Z]+?)$");
143
143
  urls.push(reg);
@@ -156,14 +156,14 @@ var FangComponent = class {
156
156
  #getUrls() {
157
157
  const url = this.#getFgUrl();
158
158
  if (url) {
159
- this.#comUrls = _fastglob2.default.sync(url, {
159
+ this.#comUrls = fastGlob.sync(url, {
160
160
  onlyFiles: false,
161
161
  absolute: true
162
162
  });
163
163
  }
164
164
  if (this.config.directives) {
165
165
  const durl = this.config.dir + "**/" + this.config.directives + "/*.js";
166
- this.#dirUrls = _fastglob2.default.sync(durl, {
166
+ this.#dirUrls = fastGlob.sync(durl, {
167
167
  onlyFiles: false,
168
168
  absolute: true
169
169
  }) || [];
@@ -174,12 +174,12 @@ var FangComponent = class {
174
174
  const reg = new RegExp("^" + this.#curDir);
175
175
  const urls = [];
176
176
  const dirUrls = [];
177
- _optionalChain([this, 'access', _3 => _3.#comUrls, 'optionalAccess', _4 => _4.forEach, 'call', _5 => _5((key) => {
177
+ this.#comUrls?.forEach((key) => {
178
178
  urls.push(key.replace(reg, dir));
179
- })]);
180
- _optionalChain([this, 'access', _6 => _6.#dirUrls, 'optionalAccess', _7 => _7.forEach, 'call', _8 => _8((key) => {
179
+ });
180
+ this.#dirUrls?.forEach((key) => {
181
181
  dirUrls.push(key.replace(reg, dir));
182
- })]);
182
+ });
183
183
  this.config.urls = urls;
184
184
  this.config.dirUrls = dirUrls;
185
185
  }
@@ -360,17 +360,17 @@ var FangComponent = class {
360
360
  #getUrlsMatchi(arr, type) {
361
361
  const as = [];
362
362
  if (type == "directive") {
363
- _optionalChain([this, 'access', _9 => _9.#dirUrls, 'optionalAccess', _10 => _10.forEach, 'call', _11 => _11((key) => {
363
+ this.#dirUrls?.forEach((key) => {
364
364
  if (isUrlsMatchi(key, arr)) {
365
365
  as.push(key);
366
366
  }
367
- })]);
367
+ });
368
368
  } else {
369
- _optionalChain([this, 'access', _12 => _12.#comUrls, 'optionalAccess', _13 => _13.forEach, 'call', _14 => _14((key) => {
369
+ this.#comUrls?.forEach((key) => {
370
370
  if (isUrlsMatchi(key, arr)) {
371
371
  as.push(key);
372
372
  }
373
- })]);
373
+ });
374
374
  }
375
375
  return as;
376
376
  }
@@ -425,6 +425,6 @@ var FangComponent = class {
425
425
  };
426
426
  var component_default = FangComponent;
427
427
 
428
-
429
-
430
- exports.component_default = component_default;
428
+ export {
429
+ component_default
430
+ };
@@ -1,15 +1,15 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
- var _chunkF6LEWVFDjs = require('./chunk-F6LEWVFD.js');
4
-
5
-
6
-
7
- var _chunkRUFNZSF3js = require('./chunk-RUFNZSF3.js');
1
+ import {
2
+ component_default
3
+ } from "./chunk-F6LEWVFD.js";
4
+ import {
5
+ config,
6
+ objectMerge
7
+ } from "./chunk-RUFNZSF3.js";
8
8
 
9
9
  // packages/resolver.ts
10
10
  function ComponentsResolver(config2 = {}) {
11
- const configs = _chunkRUFNZSF3js.objectMerge.call(void 0, _chunkRUFNZSF3js.config, config2);
12
- const fangComp = new (0, _chunkF6LEWVFDjs.component_default)(configs);
11
+ const configs = objectMerge(config, config2);
12
+ const fangComp = new component_default(configs);
13
13
  return [
14
14
  {
15
15
  type: "component",
@@ -26,6 +26,6 @@ function ComponentsResolver(config2 = {}) {
26
26
  ];
27
27
  }
28
28
 
29
-
30
-
31
- exports.ComponentsResolver = ComponentsResolver;
29
+ export {
30
+ ComponentsResolver
31
+ };
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});// packages/config.ts
1
+ // packages/config.ts
2
2
  var config = {
3
3
  dir: "./src/components/",
4
4
  extensions: ["vue"],
@@ -53,7 +53,7 @@ function objectMerge(a, b, j = 1, i) {
53
53
  return a;
54
54
  }
55
55
 
56
-
57
-
58
-
59
- exports.config = config; exports.objectMerge = objectMerge;
56
+ export {
57
+ config,
58
+ objectMerge
59
+ };
@@ -1,6 +1,6 @@
1
- // packages/component.ts
2
- import fastGlob from "fast-glob";
3
- import { resolve } from "path";
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
+ var _fastglob = require('fast-glob'); var _fastglob2 = _interopRequireDefault(_fastglob);
3
+ var _path = require('path');
4
4
  function firstUpper(vs) {
5
5
  return vs.slice(0, 1).toUpperCase() + vs.slice(1);
6
6
  }
@@ -97,7 +97,7 @@ function getName(name) {
97
97
  }
98
98
  }
99
99
  var FangComponent = class {
100
- config;
100
+
101
101
  #comUrls;
102
102
  #dirUrls;
103
103
  #cacheObj;
@@ -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(process.cwd(), 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;
@@ -135,9 +135,9 @@ var FangComponent = class {
135
135
  matchs.forEach((key) => {
136
136
  const s = "/" + v + key;
137
137
  if (extensions) {
138
- extensions?.forEach((z) => {
138
+ _optionalChain([extensions, 'optionalAccess', _ => _.forEach, 'call', _2 => _2((z) => {
139
139
  urls.push(s + "." + z);
140
- });
140
+ })]);
141
141
  } else {
142
142
  const reg = new RegExp(s + ".([a-z|A-Z]+?)$");
143
143
  urls.push(reg);
@@ -156,14 +156,14 @@ var FangComponent = class {
156
156
  #getUrls() {
157
157
  const url = this.#getFgUrl();
158
158
  if (url) {
159
- this.#comUrls = fastGlob.sync(url, {
159
+ this.#comUrls = _fastglob2.default.sync(url, {
160
160
  onlyFiles: false,
161
161
  absolute: true
162
162
  });
163
163
  }
164
164
  if (this.config.directives) {
165
165
  const durl = this.config.dir + "**/" + this.config.directives + "/*.js";
166
- this.#dirUrls = fastGlob.sync(durl, {
166
+ this.#dirUrls = _fastglob2.default.sync(durl, {
167
167
  onlyFiles: false,
168
168
  absolute: true
169
169
  }) || [];
@@ -174,12 +174,12 @@ var FangComponent = class {
174
174
  const reg = new RegExp("^" + this.#curDir);
175
175
  const urls = [];
176
176
  const dirUrls = [];
177
- this.#comUrls?.forEach((key) => {
177
+ _optionalChain([this, 'access', _3 => _3.#comUrls, 'optionalAccess', _4 => _4.forEach, 'call', _5 => _5((key) => {
178
178
  urls.push(key.replace(reg, dir));
179
- });
180
- this.#dirUrls?.forEach((key) => {
179
+ })]);
180
+ _optionalChain([this, 'access', _6 => _6.#dirUrls, 'optionalAccess', _7 => _7.forEach, 'call', _8 => _8((key) => {
181
181
  dirUrls.push(key.replace(reg, dir));
182
- });
182
+ })]);
183
183
  this.config.urls = urls;
184
184
  this.config.dirUrls = dirUrls;
185
185
  }
@@ -360,17 +360,17 @@ var FangComponent = class {
360
360
  #getUrlsMatchi(arr, type) {
361
361
  const as = [];
362
362
  if (type == "directive") {
363
- this.#dirUrls?.forEach((key) => {
363
+ _optionalChain([this, 'access', _9 => _9.#dirUrls, 'optionalAccess', _10 => _10.forEach, 'call', _11 => _11((key) => {
364
364
  if (isUrlsMatchi(key, arr)) {
365
365
  as.push(key);
366
366
  }
367
- });
367
+ })]);
368
368
  } else {
369
- this.#comUrls?.forEach((key) => {
369
+ _optionalChain([this, 'access', _12 => _12.#comUrls, 'optionalAccess', _13 => _13.forEach, 'call', _14 => _14((key) => {
370
370
  if (isUrlsMatchi(key, arr)) {
371
371
  as.push(key);
372
372
  }
373
- });
373
+ })]);
374
374
  }
375
375
  return as;
376
376
  }
@@ -425,6 +425,6 @@ var FangComponent = class {
425
425
  };
426
426
  var component_default = FangComponent;
427
427
 
428
- export {
429
- component_default
430
- };
428
+
429
+
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;
package/dist/component.js CHANGED
@@ -1,6 +1,6 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
- var _chunkF6LEWVFDjs = require('./chunk-F6LEWVFD.js');
4
-
5
-
6
- exports.default = _chunkF6LEWVFDjs.component_default;
1
+ import {
2
+ component_default
3
+ } from "./chunk-F6LEWVFD.js";
4
+ export {
5
+ component_default as default
6
+ };
@@ -0,0 +1,8 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+ var _chunk7S65AKEKcjs = require('./chunk-7S65AKEK.cjs');
5
+
6
+
7
+
8
+ exports.config = _chunk7S65AKEKcjs.config; exports.objectMerge = _chunk7S65AKEKcjs.objectMerge;
package/dist/config.js CHANGED
@@ -1,8 +1,8 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
-
4
- var _chunkRUFNZSF3js = require('./chunk-RUFNZSF3.js');
5
-
6
-
7
-
8
- exports.config = _chunkRUFNZSF3js.config; exports.objectMerge = _chunkRUFNZSF3js.objectMerge;
1
+ import {
2
+ config,
3
+ objectMerge
4
+ } from "./chunk-RUFNZSF3.js";
5
+ export {
6
+ config,
7
+ objectMerge
8
+ };
package/dist/index.cjs ADDED
@@ -0,0 +1,15 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunk76SLYNZUcjs = require('./chunk-76SLYNZU.cjs');
4
+
5
+
6
+ var _chunkYT3UEQXCcjs = require('./chunk-YT3UEQXC.cjs');
7
+ require('./chunk-7S65AKEK.cjs');
8
+
9
+ // packages/index.ts
10
+ var FangComponent = class extends _chunkYT3UEQXCcjs.component_default {
11
+ };
12
+
13
+
14
+
15
+ exports.ComponentsResolver = _chunk76SLYNZUcjs.ComponentsResolver; exports.FangComponent = FangComponent;
package/dist/index.js CHANGED
@@ -1,15 +1,15 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
- var _chunkOV35K52Gjs = require('./chunk-OV35K52G.js');
4
-
5
-
6
- var _chunkF6LEWVFDjs = require('./chunk-F6LEWVFD.js');
7
- require('./chunk-RUFNZSF3.js');
1
+ import {
2
+ ComponentsResolver
3
+ } from "./chunk-OV35K52G.js";
4
+ import {
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 _chunkF6LEWVFDjs.component_default {
10
+ var FangComponent = class extends component_default {
11
+ };
12
+ export {
13
+ ComponentsResolver,
14
+ FangComponent
11
15
  };
12
-
13
-
14
-
15
- exports.ComponentsResolver = _chunkOV35K52Gjs.ComponentsResolver; exports.FangComponent = FangComponent;
@@ -0,0 +1,8 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+ var _chunk76SLYNZUcjs = require('./chunk-76SLYNZU.cjs');
4
+ require('./chunk-YT3UEQXC.cjs');
5
+ require('./chunk-7S65AKEK.cjs');
6
+
7
+
8
+ exports.ComponentsResolver = _chunk76SLYNZUcjs.ComponentsResolver;
package/dist/resolver.js CHANGED
@@ -1,8 +1,8 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
- var _chunkOV35K52Gjs = require('./chunk-OV35K52G.js');
4
- require('./chunk-F6LEWVFD.js');
5
- require('./chunk-RUFNZSF3.js');
6
-
7
-
8
- exports.ComponentsResolver = _chunkOV35K52Gjs.ComponentsResolver;
1
+ import {
2
+ ComponentsResolver
3
+ } from "./chunk-OV35K52G.js";
4
+ import "./chunk-F6LEWVFD.js";
5
+ import "./chunk-RUFNZSF3.js";
6
+ export {
7
+ ComponentsResolver
8
+ };
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@fangzhongya/vue-components",
3
3
  "private": false,
4
- "version": "0.0.8",
4
+ "type": "module",
5
+ "version": "0.0.9",
5
6
  "description ": "unplugin-vue-components插件",
6
7
  "author": "fangzhongya ",
7
8
  "license": "MIT",
@@ -17,10 +18,12 @@
17
18
  "registry": "https://registry.npmjs.org/"
18
19
  },
19
20
  "scripts": {
21
+ "dev": "ts-node node.index.ts",
20
22
  "build": "tsup",
21
23
  "test": "vitest test"
22
24
  },
23
25
  "devDependencies": {
26
+ "@fangzhongya/create": "^0.0.2",
24
27
  "@types/node": "^18.11.18",
25
28
  "tsup": "^6.5.0",
26
29
  "typescript": "^4.9.5",
@@ -41,17 +44,33 @@
41
44
  }
42
45
  },
43
46
  "files": [
44
- "dist",
45
- "*.d.ts"
47
+ "dist"
46
48
  ],
47
49
  "exports": {
48
50
  ".": {
49
51
  "require": "./dist/index.js",
50
- "import": "./dist/index.mjs"
52
+ "import": "./dist/index.mjs",
53
+ "types": "./dist/index.d.ts"
51
54
  },
52
55
  "./archive": {
53
56
  "require": "./dist/archive.js",
54
- "import": "./dist/archive.mjs"
57
+ "import": "./dist/archive.mjs",
58
+ "types": "./dist/archive.d.ts"
59
+ },
60
+ "./config": {
61
+ "require": "./dist/config.js",
62
+ "import": "./dist/config.mjs",
63
+ "types": "./dist/config.d.ts"
64
+ },
65
+ "./component": {
66
+ "require": "./dist/component.js",
67
+ "import": "./dist/component.mjs",
68
+ "types": "./dist/component.d.ts"
69
+ },
70
+ "./resolver": {
71
+ "require": "./dist/resolver.js",
72
+ "import": "./dist/resolver.mjs",
73
+ "types": "./dist/resolver.d.ts"
55
74
  }
56
75
  }
57
76
  }
@@ -1,31 +0,0 @@
1
- import {
2
- component_default
3
- } from "./chunk-3OV2MAKS.mjs";
4
- import {
5
- config,
6
- objectMerge
7
- } from "./chunk-37Q6ZQUD.mjs";
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,6 +0,0 @@
1
- import {
2
- component_default
3
- } from "./chunk-3OV2MAKS.mjs";
4
- export {
5
- component_default as default
6
- };
package/dist/config.mjs DELETED
@@ -1,8 +0,0 @@
1
- import {
2
- config,
3
- objectMerge
4
- } from "./chunk-37Q6ZQUD.mjs";
5
- export {
6
- config,
7
- objectMerge
8
- };
package/dist/index.mjs DELETED
@@ -1,15 +0,0 @@
1
- import {
2
- ComponentsResolver
3
- } from "./chunk-BZKVRAYZ.mjs";
4
- import {
5
- component_default
6
- } from "./chunk-3OV2MAKS.mjs";
7
- import "./chunk-37Q6ZQUD.mjs";
8
-
9
- // packages/index.ts
10
- var FangComponent = class extends component_default {
11
- };
12
- export {
13
- ComponentsResolver,
14
- FangComponent
15
- };
package/dist/resolver.mjs DELETED
@@ -1,8 +0,0 @@
1
- import {
2
- ComponentsResolver
3
- } from "./chunk-BZKVRAYZ.mjs";
4
- import "./chunk-3OV2MAKS.mjs";
5
- import "./chunk-37Q6ZQUD.mjs";
6
- export {
7
- ComponentsResolver
8
- };