@vef-framework/dev 2.0.4 → 2.0.6

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.
Files changed (57) hide show
  1. package/bin/vef.js +1 -1
  2. package/dist/cjs/index.cjs +1 -23
  3. package/dist/cjs/lint/commitlint.cjs +1 -14
  4. package/dist/cjs/lint/eslint.cjs +1 -981
  5. package/dist/cjs/lint/index.cjs +1 -14
  6. package/dist/cjs/lint/stylelint.cjs +1 -93
  7. package/dist/cjs/vite/chunks.cjs +1 -30
  8. package/dist/cjs/vite/config.cjs +1 -83
  9. package/dist/cjs/vite/constants.cjs +1 -30
  10. package/dist/cjs/vite/define.cjs +3 -18
  11. package/dist/cjs/vite/index.cjs +1 -11
  12. package/dist/cjs/vite/plugin-app-config.cjs +1 -38
  13. package/dist/cjs/vite/plugin-auto-enhance/core.cjs +1 -147
  14. package/dist/cjs/vite/plugin-auto-enhance/index.cjs +1 -40
  15. package/dist/cjs/vite/plugin-auto-enhance/plugins/index.cjs +1 -10
  16. package/dist/cjs/vite/plugin-auto-enhance/plugins/operation-column-width.cjs +1 -229
  17. package/dist/cjs/vite/plugin-conventional-config.cjs +1 -91
  18. package/dist/cjs/vite/plugin-eslint.cjs +1 -24
  19. package/dist/cjs/vite/plugin-html.cjs +2 -74
  20. package/dist/cjs/vite/plugin-icons.cjs +1 -22
  21. package/dist/cjs/vite/plugin-injection.cjs +1 -20
  22. package/dist/cjs/vite/plugin-inspect.cjs +1 -15
  23. package/dist/cjs/vite/plugin-react.cjs +1 -80
  24. package/dist/cjs/vite/plugin-router.cjs +4 -42
  25. package/dist/cjs/vite/plugin-stylelint.cjs +1 -24
  26. package/dist/cjs/vite/plugin-svgr.cjs +1 -59
  27. package/dist/cjs/vite/plugin-tsconfig-paths.cjs +1 -14
  28. package/dist/cjs/vite/postcss.cjs +1 -13
  29. package/dist/cli/index.js +5 -0
  30. package/dist/es/index.js +14 -8
  31. package/dist/es/lint/commitlint.js +5 -6
  32. package/dist/es/lint/eslint.js +135 -137
  33. package/dist/es/lint/index.js +8 -4
  34. package/dist/es/lint/stylelint.js +16 -19
  35. package/dist/es/vite/chunks.js +12 -18
  36. package/dist/es/vite/config.js +63 -68
  37. package/dist/es/vite/constants.js +15 -15
  38. package/dist/es/vite/define.js +10 -11
  39. package/dist/es/vite/index.js +5 -3
  40. package/dist/es/vite/plugin-app-config.js +19 -20
  41. package/dist/es/vite/plugin-auto-enhance/core.js +51 -90
  42. package/dist/es/vite/plugin-auto-enhance/index.js +19 -23
  43. package/dist/es/vite/plugin-auto-enhance/plugins/index.js +4 -2
  44. package/dist/es/vite/plugin-auto-enhance/plugins/operation-column-width.js +117 -181
  45. package/dist/es/vite/plugin-conventional-config.js +42 -44
  46. package/dist/es/vite/plugin-eslint.js +14 -15
  47. package/dist/es/vite/plugin-html.js +42 -53
  48. package/dist/es/vite/plugin-icons.js +10 -11
  49. package/dist/es/vite/plugin-injection.js +4 -4
  50. package/dist/es/vite/plugin-inspect.js +8 -9
  51. package/dist/es/vite/plugin-react.js +25 -35
  52. package/dist/es/vite/plugin-router.js +20 -21
  53. package/dist/es/vite/plugin-stylelint.js +14 -15
  54. package/dist/es/vite/plugin-svgr.js +19 -20
  55. package/dist/es/vite/plugin-tsconfig-paths.js +7 -8
  56. package/dist/es/vite/postcss.js +5 -5
  57. package/package.json +10 -8
@@ -1,225 +1,161 @@
1
- /*! @vef-framework/dev v2.0.3 made with ❤️ by Venus | 2025-11-26T02:32:33.686Z */
2
- import { visit, types } from 'recast';
3
-
4
- const CJK_CHAR_REGEX = /[\u4E00-\u9FFF\u3400-\u4DBF\uFF00-\uFFEF]/;
5
- const OPERATION_COLUMN_ATTR = "operationColumn";
6
- const OPERATION_BUTTON_COMPONENT = "OperationButton";
7
- const VALID_IMPORT_SOURCES = [
1
+ import { visit as l, types as n } from "recast";
2
+ const v = /[\u4E00-\u9FFF\u3400-\u4DBF\uFF00-\uFFEF]/, T = "operationColumn", I = "OperationButton", x = [
8
3
  "@vef-framework/components",
9
4
  "@vef-framework/starter"
10
5
  ];
11
- function isValidImportSource(source) {
12
- return VALID_IMPORT_SOURCES.some((pkg) => source === pkg || source.startsWith(`${pkg}/`));
6
+ function C(r) {
7
+ return x.some((e) => r === e || r.startsWith(`${e}/`));
13
8
  }
14
- function collectOperationButtonAliases(ast) {
15
- const aliasMap = /* @__PURE__ */ new Map();
16
- visit(ast, {
17
- visitImportDeclaration(path) {
18
- const source = path.node.source.value;
19
- if (typeof source !== "string" || !isValidImportSource(source)) {
20
- this.traverse(path);
21
- return false;
22
- }
23
- for (const specifier of path.node.specifiers || []) {
24
- if (types.namedTypes.ImportSpecifier.check(specifier)) {
25
- const { imported } = specifier;
26
- const { local } = specifier;
27
- if (types.namedTypes.Identifier.check(imported) && types.namedTypes.Identifier.check(local) && imported.name === OPERATION_BUTTON_COMPONENT) {
28
- aliasMap.set(local.name, imported.name);
29
- }
9
+ function S(r) {
10
+ const e = /* @__PURE__ */ new Map();
11
+ return l(r, {
12
+ visitImportDeclaration(t) {
13
+ const i = t.node.source.value;
14
+ if (typeof i != "string" || !C(i))
15
+ return this.traverse(t), !1;
16
+ for (const s of t.node.specifiers || [])
17
+ if (n.namedTypes.ImportSpecifier.check(s)) {
18
+ const { imported: o } = s, { local: a } = s;
19
+ n.namedTypes.Identifier.check(o) && n.namedTypes.Identifier.check(a) && o.name === I && e.set(a.name, o.name);
30
20
  }
31
- }
32
- this.traverse(path);
33
- return false;
21
+ return this.traverse(t), !1;
34
22
  }
35
- });
36
- return aliasMap;
23
+ }), e;
37
24
  }
38
- function calculateTextWidth(text) {
39
- let width = 0;
40
- for (const char of text) {
41
- width += CJK_CHAR_REGEX.test(char) ? 14 : 8;
42
- }
43
- return width;
25
+ function O(r) {
26
+ let e = 0;
27
+ for (const t of r)
28
+ e += v.test(t) ? 14 : 8;
29
+ return e;
44
30
  }
45
- function calculateOperationColumnWidth(buttons) {
46
- if (buttons.length === 0) {
31
+ function P(r) {
32
+ if (r.length === 0)
47
33
  return {
48
34
  calculatedWidth: 64,
49
35
  buttonCount: 0,
50
36
  analysis: "No buttons found, using minimum width"
51
37
  };
38
+ let e = 0;
39
+ const t = r.length;
40
+ for (const [o, a] of r.entries()) {
41
+ let c = 16;
42
+ a.hasIcon && (c += 16, a.textContent && (c += 8)), a.textContent && (c += O(a.textContent)), c = Math.max(c, a.hasIcon && !a.textContent ? 32 : 64), e += c, o < t - 1 && (e += 8);
52
43
  }
53
- let totalWidth = 0;
54
- const buttonCount = buttons.length;
55
- for (const [index, button] of buttons.entries()) {
56
- let buttonWidth = 16;
57
- if (button.hasIcon) {
58
- buttonWidth += 16;
59
- if (button.textContent) {
60
- buttonWidth += 8;
61
- }
62
- }
63
- if (button.textContent) {
64
- buttonWidth += calculateTextWidth(button.textContent);
65
- }
66
- buttonWidth = Math.max(buttonWidth, button.hasIcon && !button.textContent ? 32 : 64);
67
- totalWidth += buttonWidth;
68
- if (index < buttonCount - 1) {
69
- totalWidth += 8;
70
- }
71
- }
72
- totalWidth += 16;
73
- const finalWidth = Math.ceil(totalWidth / 8) * 8;
74
- const analysis = `${buttonCount} buttons, calculated: ${totalWidth}px, final: ${finalWidth}px`;
44
+ e += 16;
45
+ const i = Math.ceil(e / 8) * 8, s = `${t} buttons, calculated: ${e}px, final: ${i}px`;
75
46
  return {
76
- calculatedWidth: finalWidth,
77
- buttonCount,
78
- analysis
47
+ calculatedWidth: i,
48
+ buttonCount: t,
49
+ analysis: s
79
50
  };
80
51
  }
81
- function extractButtonInfo(jsxElement, aliasMap) {
82
- const { openingElement } = jsxElement;
83
- if (!types.namedTypes.JSXIdentifier.check(openingElement.name)) {
52
+ function g(r, e) {
53
+ const { openingElement: t } = r;
54
+ if (!n.namedTypes.JSXIdentifier.check(t.name))
84
55
  return null;
85
- }
86
- const componentName = openingElement.name.name;
87
- if (!aliasMap.has(componentName)) {
56
+ const i = t.name.name;
57
+ if (!e.has(i))
88
58
  return null;
89
- }
90
- const buttonInfo = {
91
- hasIcon: false,
59
+ const s = {
60
+ hasIcon: !1,
92
61
  textContent: ""
93
62
  };
94
- for (const attr of openingElement.attributes || []) {
95
- if (types.namedTypes.JSXAttribute.check(attr) && types.namedTypes.JSXIdentifier.check(attr.name) && attr.name.name === "icon") {
96
- buttonInfo.hasIcon = true;
97
- }
98
- }
99
- for (const child of jsxElement.children || []) {
100
- if (types.namedTypes.JSXText.check(child)) {
101
- buttonInfo.textContent += child.value.trim();
102
- } else if (types.namedTypes.JSXExpressionContainer.check(child) && types.namedTypes.StringLiteral.check(child.expression)) {
103
- buttonInfo.textContent += child.expression.value;
104
- }
105
- }
106
- return buttonInfo;
63
+ for (const o of t.attributes || [])
64
+ n.namedTypes.JSXAttribute.check(o) && n.namedTypes.JSXIdentifier.check(o.name) && o.name.name === "icon" && (s.hasIcon = !0);
65
+ for (const o of r.children || [])
66
+ n.namedTypes.JSXText.check(o) ? s.textContent += o.value.trim() : n.namedTypes.JSXExpressionContainer.check(o) && n.namedTypes.StringLiteral.check(o.expression) && (s.textContent += o.expression.value);
67
+ return s;
107
68
  }
108
- function findOperationButtons(node, aliasMap) {
109
- const buttons = [];
110
- visit(node, {
111
- visitJSXElement(path) {
112
- const buttonInfo = extractButtonInfo(path.node, aliasMap);
113
- if (buttonInfo) {
114
- buttons.push(buttonInfo);
115
- }
116
- this.traverse(path);
117
- return false;
69
+ function k(r, e) {
70
+ const t = [];
71
+ return l(r, {
72
+ visitJSXElement(i) {
73
+ const s = g(i.node, e);
74
+ return s && t.push(s), this.traverse(i), !1;
118
75
  }
119
- });
120
- return buttons;
76
+ }), t;
121
77
  }
122
- function hasWidthProperty(objectExpression) {
123
- return objectExpression.properties.some((prop) => {
124
- if (types.namedTypes.ObjectProperty.check(prop)) {
125
- const { key } = prop;
126
- return types.namedTypes.Identifier.check(key) && key.name === "width" || types.namedTypes.StringLiteral.check(key) && key.value === "width";
78
+ function E(r) {
79
+ return r.properties.some((e) => {
80
+ if (n.namedTypes.ObjectProperty.check(e)) {
81
+ const { key: t } = e;
82
+ return n.namedTypes.Identifier.check(t) && t.name === "width" || n.namedTypes.StringLiteral.check(t) && t.value === "width";
127
83
  }
128
- return false;
84
+ return !1;
129
85
  });
130
86
  }
131
- function getRenderProperty(objectExpression) {
132
- return objectExpression.properties.find((prop) => {
133
- if (types.namedTypes.ObjectProperty.check(prop) || types.namedTypes.ObjectMethod.check(prop)) {
134
- const { key } = prop;
135
- return types.namedTypes.Identifier.check(key) && key.name === "render" || types.namedTypes.StringLiteral.check(key) && key.value === "render";
87
+ function w(r) {
88
+ return r.properties.find((e) => {
89
+ if (n.namedTypes.ObjectProperty.check(e) || n.namedTypes.ObjectMethod.check(e)) {
90
+ const { key: t } = e;
91
+ return n.namedTypes.Identifier.check(t) && t.name === "render" || n.namedTypes.StringLiteral.check(t) && t.value === "render";
136
92
  }
137
- return false;
93
+ return !1;
138
94
  });
139
95
  }
140
- function getComponentName(jsxElement) {
141
- const { openingElement } = jsxElement;
142
- if (types.namedTypes.JSXIdentifier.check(openingElement.name)) {
143
- return openingElement.name.name;
144
- }
145
- if (types.namedTypes.JSXMemberExpression.check(openingElement.name)) {
146
- const { object, property } = openingElement.name;
147
- const objectName = types.namedTypes.JSXIdentifier.check(object) ? object.name : "?";
148
- const propertyName = types.namedTypes.JSXIdentifier.check(property) ? property.name : "?";
149
- return `${objectName}.${propertyName}`;
96
+ function J(r) {
97
+ const { openingElement: e } = r;
98
+ if (n.namedTypes.JSXIdentifier.check(e.name))
99
+ return e.name.name;
100
+ if (n.namedTypes.JSXMemberExpression.check(e.name)) {
101
+ const { object: t, property: i } = e.name, s = n.namedTypes.JSXIdentifier.check(t) ? t.name : "?", o = n.namedTypes.JSXIdentifier.check(i) ? i.name : "?";
102
+ return `${s}.${o}`;
150
103
  }
151
104
  return "Unknown";
152
105
  }
153
- const operationColumnWidthPlugin = {
106
+ const N = {
154
107
  name: "operation-column-width",
155
108
  description: "Automatically calculate optimal width for operation columns based on button analysis",
156
- shouldProcess(context) {
157
- return context.code.includes(OPERATION_COLUMN_ATTR);
109
+ shouldProcess(r) {
110
+ return r.code.includes(T);
158
111
  },
159
- transform(context) {
160
- const aliasMap = collectOperationButtonAliases(context.ast);
161
- if (aliasMap.size === 0) {
162
- return { hasChanges: false, logs: [] };
163
- }
164
- let hasChanges = false;
165
- const logs = [];
166
- visit(context.ast, {
167
- visitJSXAttribute(path) {
168
- const attr = path.node;
169
- if (!types.namedTypes.JSXIdentifier.check(attr.name) || attr.name.name !== OPERATION_COLUMN_ATTR) {
170
- this.traverse(path);
171
- return false;
172
- }
173
- if (!types.namedTypes.JSXExpressionContainer.check(attr.value) || !types.namedTypes.ObjectExpression.check(attr.value.expression)) {
174
- this.traverse(path);
175
- return false;
176
- }
177
- const objectExpression = attr.value.expression;
178
- if (hasWidthProperty(objectExpression)) {
179
- this.traverse(path);
180
- return false;
181
- }
182
- const renderProperty = getRenderProperty(objectExpression);
183
- if (!renderProperty) {
184
- this.traverse(path);
185
- return false;
186
- }
187
- const buttons = types.namedTypes.ObjectProperty.check(renderProperty) ? findOperationButtons(renderProperty.value, aliasMap) : findOperationButtons(renderProperty.body, aliasMap);
188
- if (buttons.length === 0) {
189
- this.traverse(path);
190
- return false;
191
- }
192
- const { calculatedWidth, analysis } = calculateOperationColumnWidth(buttons);
193
- const widthProperty = types.builders.objectProperty(
194
- types.builders.identifier("width"),
195
- types.builders.numericLiteral(calculatedWidth)
112
+ transform(r) {
113
+ const e = S(r.ast);
114
+ if (e.size === 0)
115
+ return { hasChanges: !1, logs: [] };
116
+ let t = !1;
117
+ const i = [];
118
+ return l(r.ast, {
119
+ visitJSXAttribute(s) {
120
+ const o = s.node;
121
+ if (!n.namedTypes.JSXIdentifier.check(o.name) || o.name.name !== T)
122
+ return this.traverse(s), !1;
123
+ if (!n.namedTypes.JSXExpressionContainer.check(o.value) || !n.namedTypes.ObjectExpression.check(o.value.expression))
124
+ return this.traverse(s), !1;
125
+ const a = o.value.expression;
126
+ if (E(a))
127
+ return this.traverse(s), !1;
128
+ const c = w(a);
129
+ if (!c)
130
+ return this.traverse(s), !1;
131
+ const f = n.namedTypes.ObjectProperty.check(c) ? k(c.value, e) : k(c.body, e);
132
+ if (f.length === 0)
133
+ return this.traverse(s), !1;
134
+ const { calculatedWidth: m, analysis: d } = P(f), p = n.builders.objectProperty(
135
+ n.builders.identifier("width"),
136
+ n.builders.numericLiteral(m)
196
137
  );
197
- widthProperty.comments = [types.builders.commentLine(` Auto-calculated: ${analysis} `, true, false)];
198
- objectExpression.properties.unshift(widthProperty);
199
- hasChanges = true;
200
- let componentName = "Unknown";
201
- let { parentPath } = path;
202
- while (parentPath) {
203
- const { node, parentPath: nextParentPath } = parentPath;
204
- if (types.namedTypes.JSXElement.check(node)) {
205
- componentName = getComponentName(node);
138
+ p.comments = [n.builders.commentLine(` Auto-calculated: ${d} `, !0, !1)], a.properties.unshift(p), t = !0;
139
+ let h = "Unknown", { parentPath: u } = s;
140
+ for (; u; ) {
141
+ const { node: y, parentPath: b } = u;
142
+ if (n.namedTypes.JSXElement.check(y)) {
143
+ h = J(y);
206
144
  break;
207
145
  }
208
- parentPath = nextParentPath;
146
+ u = b;
209
147
  }
210
- logs.push(
211
- `📊 ${componentName}: ${context.fileName}`,
212
- ` └─ 🎯 Operation column auto-width: ${calculatedWidth}px (${analysis})`
213
- );
214
- this.traverse(path);
215
- return false;
148
+ return i.push(
149
+ `📊 ${h}: ${r.fileName}`,
150
+ ` └─ 🎯 Operation column auto-width: ${m}px (${d})`
151
+ ), this.traverse(s), !1;
216
152
  }
217
- });
218
- return {
219
- hasChanges,
220
- logs
153
+ }), {
154
+ hasChanges: t,
155
+ logs: i
221
156
  };
222
157
  }
223
158
  };
224
-
225
- export { operationColumnWidthPlugin };
159
+ export {
160
+ N as operationColumnWidthPlugin
161
+ };
@@ -1,39 +1,36 @@
1
- /*! @vef-framework/dev v2.0.3 made with ❤️ by Venus | 2025-11-26T02:32:33.686Z */
2
- import { createChunksConfig } from './chunks.js';
3
- import { DEFAULT_SERVER_PORT, ASSETS_DIR, VEF_FRAMEWORK_VERSION, DEFAULT_OUTPUT_DIR, ENV_BUILD_PREFIX, ENV_APP_PREFIX, ENV_DIR, PUBLIC_DIR } from './constants.js';
4
- import { defineConstants } from './define.js';
5
- import { createPostcssConfig } from './postcss.js';
6
-
7
- function createConventionalConfigPlugin({
8
- appName,
9
- appVersion,
10
- basePublicPath,
11
- projectDir,
12
- outputDir,
13
- serverPort,
14
- proxies
1
+ import { createChunksConfig as u } from "./chunks.js";
2
+ import { DEFAULT_SERVER_PORT as p, ASSETS_DIR as e, VEF_FRAMEWORK_VERSION as m, DEFAULT_OUTPUT_DIR as c, ENV_BUILD_PREFIX as f, ENV_APP_PREFIX as v, ENV_DIR as h, PUBLIC_DIR as D } from "./constants.js";
3
+ import { defineConstants as d } from "./define.js";
4
+ import { createPostcssConfig as E } from "./postcss.js";
5
+ function g({
6
+ appName: t,
7
+ appVersion: s,
8
+ basePublicPath: r,
9
+ projectDir: o,
10
+ outputDir: i,
11
+ serverPort: n,
12
+ proxies: a
15
13
  }) {
16
14
  return {
17
15
  name: "vef-framework:conventional-config",
18
- config(_, { command }) {
19
- const isDev = command === "serve";
16
+ config(_, { command: l }) {
20
17
  return {
21
18
  appType: "spa",
22
- root: projectDir,
23
- base: basePublicPath,
24
- publicDir: PUBLIC_DIR,
25
- envDir: ENV_DIR,
26
- envPrefix: [ENV_BUILD_PREFIX, ENV_APP_PREFIX],
27
- define: defineConstants(appName, appVersion, isDev),
19
+ root: o,
20
+ base: r,
21
+ publicDir: D,
22
+ envDir: h,
23
+ envPrefix: [f, v],
24
+ define: d(t, s, l === "serve"),
28
25
  css: {
29
26
  transformer: "postcss",
30
27
  modules: {
31
28
  scopeBehaviour: "local",
32
29
  localsConvention: "camelCaseOnly",
33
- exportGlobals: true,
30
+ exportGlobals: !0,
34
31
  hashPrefix: "vef"
35
32
  },
36
- postcss: createPostcssConfig(),
33
+ postcss: E(),
37
34
  preprocessorOptions: {
38
35
  scss: {}
39
36
  }
@@ -48,40 +45,41 @@ function createConventionalConfigPlugin({
48
45
  }
49
46
  },
50
47
  build: {
51
- outDir: outputDir ?? DEFAULT_OUTPUT_DIR,
48
+ outDir: i ?? c,
52
49
  target: "es2024",
53
- assetsDir: ASSETS_DIR,
50
+ assetsDir: e,
54
51
  assetsInlineLimit: 10240,
55
- reportCompressedSize: false,
52
+ reportCompressedSize: !1,
56
53
  chunkSizeWarningLimit: 5120,
57
- minify: true,
58
- cssCodeSplit: true,
59
- cssMinify: true,
60
- sourcemap: false,
54
+ minify: !0,
55
+ cssCodeSplit: !0,
56
+ cssMinify: !0,
57
+ sourcemap: !1,
61
58
  rollupOptions: {
62
59
  input: {
63
60
  main: "index.html"
64
61
  },
65
62
  output: {
66
- banner: `/*! Powered by VEF Framework v${VEF_FRAMEWORK_VERSION}.${appVersion ? ` App version v${appVersion}.` : ""} Built at ${(/* @__PURE__ */ new Date()).toISOString()} */`,
67
- chunkFileNames: `${ASSETS_DIR}/js/[name]-[hash].js`,
68
- entryFileNames: `${ASSETS_DIR}/js/[name]-[hash].js`,
69
- assetFileNames: `${ASSETS_DIR}/[ext]/[name]-[hash].[ext]`,
70
- manualChunks: createChunksConfig()
63
+ banner: `/*! Powered by VEF Framework v${m}.${s ? ` App version v${s}.` : ""} Built at ${(/* @__PURE__ */ new Date()).toISOString()} */`,
64
+ chunkFileNames: `${e}/js/[name]-[hash].js`,
65
+ entryFileNames: `${e}/js/[name]-[hash].js`,
66
+ assetFileNames: `${e}/[ext]/[name]-[hash].[ext]`,
67
+ manualChunks: u()
71
68
  }
72
69
  }
73
70
  },
74
71
  server: {
75
- port: serverPort || DEFAULT_SERVER_PORT,
76
- strictPort: true,
77
- host: true,
78
- allowedHosts: true,
79
- open: true,
80
- proxy: proxies
72
+ port: n || p,
73
+ strictPort: !0,
74
+ host: !0,
75
+ allowedHosts: !0,
76
+ open: !0,
77
+ proxy: a
81
78
  }
82
79
  };
83
80
  }
84
81
  };
85
82
  }
86
-
87
- export { createConventionalConfigPlugin };
83
+ export {
84
+ g as createConventionalConfigPlugin
85
+ };
@@ -1,20 +1,19 @@
1
- /*! @vef-framework/dev v2.0.3 made with ❤️ by Venus | 2025-11-26T02:32:33.686Z */
2
- import eslint from 'vite-plugin-eslint2';
3
-
4
- function createEslintPlugin() {
5
- return eslint({
6
- fix: false,
7
- test: false,
8
- dev: true,
9
- build: false,
10
- cache: true,
1
+ import e from "vite-plugin-eslint2";
2
+ function r() {
3
+ return e({
4
+ fix: !1,
5
+ test: !1,
6
+ dev: !0,
7
+ build: !1,
8
+ cache: !0,
11
9
  cacheLocation: "node_modules/.cache/.eslintcache",
12
10
  include: ["*.{js,ts,json,yaml,md}", "src/**/*.{ts,tsx,json,yaml,md}"],
13
11
  exclude: ["node_modules", "virtual:", "vef:"],
14
- emitError: true,
15
- emitWarning: true,
16
- emitWarningAsError: true
12
+ emitError: !0,
13
+ emitWarning: !0,
14
+ emitWarningAsError: !0
17
15
  });
18
16
  }
19
-
20
- export { createEslintPlugin };
17
+ export {
18
+ r as createEslintPlugin
19
+ };
@@ -1,8 +1,5 @@
1
- /*! @vef-framework/dev v2.0.3 made with ❤️ by Venus | 2025-11-26T02:32:33.686Z */
2
- import { minify } from 'html-minifier-terser';
3
-
4
- const virtualModuleId = "index.html";
5
- const htmlContent = `
1
+ import { minify as o } from "html-minifier-terser";
2
+ const i = "index.html", a = `
6
3
  <!doctype html>
7
4
  <html lang="en">
8
5
  <head>
@@ -146,67 +143,59 @@ const htmlContent = `
146
143
  </body>
147
144
  </html>
148
145
  `;
149
- function createHtmlPlugin() {
146
+ function l() {
150
147
  return [
151
148
  {
152
149
  name: "vef-framework:html",
153
- resolveId(source) {
154
- if (source === virtualModuleId) {
155
- return virtualModuleId;
156
- }
157
- return null;
150
+ resolveId(t) {
151
+ return t === i ? i : null;
158
152
  },
159
- load(id) {
160
- if (id === virtualModuleId) {
161
- return htmlContent;
162
- }
163
- return null;
153
+ load(t) {
154
+ return t === i ? a : null;
164
155
  },
165
156
  transformIndexHtml: {
166
157
  order: "pre",
167
- handler: () => htmlContent
158
+ handler: () => a
168
159
  }
169
160
  },
170
161
  {
171
162
  name: "vef-framework:html-minify",
172
163
  enforce: "post",
173
- async generateBundle(_, bundles) {
174
- for (const bundle of Object.values(bundles)) {
175
- if (bundle.type === "asset" && typeof bundle.source === "string" && bundle.fileName === virtualModuleId) {
176
- bundle.source = await minify(
177
- bundle.source,
178
- {
179
- collapseBooleanAttributes: true,
180
- collapseInlineTagWhitespace: true,
181
- collapseWhitespace: true,
182
- conservativeCollapse: false,
183
- keepClosingSlash: true,
184
- minifyCSS: true,
185
- minifyJS: true,
186
- minifyURLs: true,
187
- noNewlinesBeforeTagClose: true,
188
- quoteCharacter: `"`,
189
- removeAttributeQuotes: false,
190
- removeComments: true,
191
- removeEmptyAttributes: true,
192
- removeOptionalTags: false,
193
- removeRedundantAttributes: true,
194
- removeScriptTypeAttributes: false,
195
- removeTagWhitespace: false,
196
- removeEmptyElements: false,
197
- removeStyleLinkTypeAttributes: false,
198
- sortAttributes: true,
199
- sortClassName: true,
200
- trimCustomFragments: true,
201
- useShortDoctype: true,
202
- html5: true
203
- }
204
- );
205
- }
206
- }
164
+ async generateBundle(t, n) {
165
+ for (const e of Object.values(n))
166
+ e.type === "asset" && typeof e.source == "string" && e.fileName === i && (e.source = await o(
167
+ e.source,
168
+ {
169
+ collapseBooleanAttributes: !0,
170
+ collapseInlineTagWhitespace: !0,
171
+ collapseWhitespace: !0,
172
+ conservativeCollapse: !1,
173
+ keepClosingSlash: !0,
174
+ minifyCSS: !0,
175
+ minifyJS: !0,
176
+ minifyURLs: !0,
177
+ noNewlinesBeforeTagClose: !0,
178
+ quoteCharacter: '"',
179
+ removeAttributeQuotes: !1,
180
+ removeComments: !0,
181
+ removeEmptyAttributes: !0,
182
+ removeOptionalTags: !1,
183
+ removeRedundantAttributes: !0,
184
+ removeScriptTypeAttributes: !1,
185
+ removeTagWhitespace: !1,
186
+ removeEmptyElements: !1,
187
+ removeStyleLinkTypeAttributes: !1,
188
+ sortAttributes: !0,
189
+ sortClassName: !0,
190
+ trimCustomFragments: !0,
191
+ useShortDoctype: !0,
192
+ html5: !0
193
+ }
194
+ ));
207
195
  }
208
196
  }
209
197
  ];
210
198
  }
211
-
212
- export { createHtmlPlugin };
199
+ export {
200
+ l as createHtmlPlugin
201
+ };
@@ -1,17 +1,16 @@
1
- /*! @vef-framework/dev v2.0.3 made with ❤️ by Venus | 2025-11-26T02:32:33.686Z */
2
- import { resolve, dirname } from 'node:path';
3
- import { fileURLToPath } from 'node:url';
4
- import icons from 'unplugin-icons/vite';
5
-
6
- function createIconsPlugin(projectDir) {
7
- return icons({
8
- autoInstall: false,
1
+ import { resolve as e, dirname as l } from "node:path";
2
+ import { fileURLToPath as r } from "node:url";
3
+ import t from "unplugin-icons/vite";
4
+ function n(o) {
5
+ return t({
6
+ autoInstall: !1,
9
7
  compiler: "jsx",
10
8
  jsx: "react",
11
9
  defaultClass: "inline-block",
12
10
  scale: 1.2,
13
- collectionsNodeResolvePath: [projectDir, resolve(dirname(fileURLToPath(import.meta.url)), "..")]
11
+ collectionsNodeResolvePath: [o, e(l(r(import.meta.url)), "..")]
14
12
  });
15
13
  }
16
-
17
- export { createIconsPlugin };
14
+ export {
15
+ n as createIconsPlugin
16
+ };