@vef-framework/dev 1.0.100 → 1.0.101
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/es/cli.js +225 -2
- package/es/commitlint-config.js +11 -2
- package/es/config.js +77 -2
- package/es/constants.js +14 -2
- package/es/eslint-config.js +410 -2
- package/es/index.js +6 -2
- package/es/modules.d.js +2 -1
- package/es/plugin-app-config.js +34 -2
- package/es/plugin-conventional-config.js +95 -2
- package/es/plugin-eslint.js +20 -2
- package/es/plugin-html.js +82 -2
- package/es/plugin-icons.js +17 -2
- package/es/plugin-injection.js +17 -2
- package/es/plugin-inspect.js +11 -2
- package/es/plugin-react-swc.js +10 -2
- package/es/plugin-router.js +44 -2
- package/es/plugin-stylelint.js +20 -2
- package/es/plugin-svgr.js +55 -2
- package/es/plugin-tailwind.js +8 -2
- package/es/plugin-tailwindcss.js +21 -2
- package/es/plugin-tsconfig-paths.js +10 -2
- package/es/plugin-visualizer.js +12 -2
- package/es/plugin-webfont.js +11 -2
- package/es/stylelint-config.js +64 -2
- package/es/tailwind-config.js +392 -2
- package/lib/cli.cjs +227 -2
- package/lib/commitlint-config.cjs +15 -2
- package/lib/config.cjs +81 -2
- package/lib/constants.cjs +28 -2
- package/lib/eslint-config.cjs +414 -2
- package/lib/index.cjs +18 -2
- package/lib/modules.d.cjs +4 -2
- package/lib/plugin-app-config.cjs +38 -2
- package/lib/plugin-conventional-config.cjs +99 -2
- package/lib/plugin-eslint.cjs +24 -2
- package/lib/plugin-html.cjs +86 -2
- package/lib/plugin-icons.cjs +22 -2
- package/lib/plugin-injection.cjs +21 -2
- package/lib/plugin-inspect.cjs +15 -2
- package/lib/plugin-react-swc.cjs +14 -2
- package/lib/plugin-router.cjs +48 -2
- package/lib/plugin-stylelint.cjs +24 -2
- package/lib/plugin-svgr.cjs +59 -2
- package/lib/plugin-tailwind.cjs +12 -2
- package/lib/plugin-tailwindcss.cjs +25 -2
- package/lib/plugin-tsconfig-paths.cjs +14 -2
- package/lib/plugin-visualizer.cjs +16 -2
- package/lib/plugin-webfont.cjs +15 -2
- package/lib/stylelint-config.cjs +68 -2
- package/lib/tailwind-config.cjs +396 -2
- package/lib/types.cjs +4 -2
- package/package.json +1 -1
- package/template/_package.json +5 -5
package/es/eslint-config.js
CHANGED
|
@@ -1,3 +1,411 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
2
|
-
import{antfu
|
|
1
|
+
/*! VefFramework version: 1.0.101, build time: 2025-03-07T14:07:15.261Z, made by Venus. */
|
|
2
|
+
import { antfu } from '@antfu/eslint-config';
|
|
3
|
+
import pluginRouter from '@tanstack/eslint-plugin-router';
|
|
4
|
+
|
|
5
|
+
function defineEslintConfig() {
|
|
6
|
+
return antfu(
|
|
7
|
+
{
|
|
8
|
+
ignores: [
|
|
9
|
+
"**/node_modules",
|
|
10
|
+
"**/dist",
|
|
11
|
+
"**/public"
|
|
12
|
+
],
|
|
13
|
+
stylistic: {
|
|
14
|
+
indent: 2,
|
|
15
|
+
jsx: true,
|
|
16
|
+
quotes: "double",
|
|
17
|
+
semi: true,
|
|
18
|
+
overrides: {
|
|
19
|
+
"style/line-comment-position": [
|
|
20
|
+
"error",
|
|
21
|
+
{
|
|
22
|
+
position: "above"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"style/jsx-self-closing-comp": [
|
|
26
|
+
"error",
|
|
27
|
+
{
|
|
28
|
+
component: true,
|
|
29
|
+
html: true
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"style/jsx-newline": [
|
|
33
|
+
"error",
|
|
34
|
+
{
|
|
35
|
+
prevent: true,
|
|
36
|
+
allowMultilines: true
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"style/jsx-props-no-multi-spaces": "error",
|
|
40
|
+
"style/jsx-sort-props": [
|
|
41
|
+
"error",
|
|
42
|
+
{
|
|
43
|
+
callbacksLast: true,
|
|
44
|
+
shorthandFirst: true,
|
|
45
|
+
shorthandLast: false,
|
|
46
|
+
multiline: "last",
|
|
47
|
+
ignoreCase: true,
|
|
48
|
+
noSortAlphabetically: false,
|
|
49
|
+
reservedFirst: ["key", "ref"]
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"style/newline-per-chained-call": [
|
|
53
|
+
"error",
|
|
54
|
+
{
|
|
55
|
+
ignoreChainWithDepth: 3
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"style/object-property-newline": "error",
|
|
59
|
+
"style/brace-style": [
|
|
60
|
+
"error",
|
|
61
|
+
"1tbs"
|
|
62
|
+
],
|
|
63
|
+
"style/arrow-parens": [
|
|
64
|
+
"error",
|
|
65
|
+
"as-needed"
|
|
66
|
+
],
|
|
67
|
+
"style/multiline-comment-style": [
|
|
68
|
+
"error",
|
|
69
|
+
"separate-lines",
|
|
70
|
+
{
|
|
71
|
+
checkJSDoc: false
|
|
72
|
+
}
|
|
73
|
+
],
|
|
74
|
+
"style/implicit-arrow-linebreak": [
|
|
75
|
+
"error",
|
|
76
|
+
"beside"
|
|
77
|
+
],
|
|
78
|
+
"style/no-extra-semi": "error",
|
|
79
|
+
"style/array-element-newline": [
|
|
80
|
+
"error",
|
|
81
|
+
{
|
|
82
|
+
consistent: true,
|
|
83
|
+
multiline: true,
|
|
84
|
+
minItems: 7
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
"style/function-call-argument-newline": [
|
|
88
|
+
"error",
|
|
89
|
+
"consistent"
|
|
90
|
+
],
|
|
91
|
+
"style/padding-line-between-statements": [
|
|
92
|
+
"error",
|
|
93
|
+
{
|
|
94
|
+
blankLine: "always",
|
|
95
|
+
prev: "*",
|
|
96
|
+
next: [
|
|
97
|
+
"block",
|
|
98
|
+
"multiline-block-like",
|
|
99
|
+
"type",
|
|
100
|
+
"interface",
|
|
101
|
+
"enum",
|
|
102
|
+
"function",
|
|
103
|
+
"function-overload"
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
blankLine: "always",
|
|
108
|
+
prev: [
|
|
109
|
+
"block",
|
|
110
|
+
"multiline-block-like",
|
|
111
|
+
"type",
|
|
112
|
+
"interface",
|
|
113
|
+
"enum",
|
|
114
|
+
"function",
|
|
115
|
+
"function-overload"
|
|
116
|
+
],
|
|
117
|
+
next: "*"
|
|
118
|
+
}
|
|
119
|
+
],
|
|
120
|
+
"style/jsx-pascal-case": [
|
|
121
|
+
"error",
|
|
122
|
+
{
|
|
123
|
+
allowAllCaps: false,
|
|
124
|
+
allowLeadingUnderscore: false,
|
|
125
|
+
allowNamespace: false,
|
|
126
|
+
ignore: []
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
"style/switch-colon-spacing": [
|
|
130
|
+
"error",
|
|
131
|
+
{
|
|
132
|
+
before: false,
|
|
133
|
+
after: true
|
|
134
|
+
}
|
|
135
|
+
],
|
|
136
|
+
"style/object-curly-newline": [
|
|
137
|
+
"error",
|
|
138
|
+
{
|
|
139
|
+
ObjectExpression: {
|
|
140
|
+
multiline: true,
|
|
141
|
+
consistent: true,
|
|
142
|
+
minProperties: 3
|
|
143
|
+
},
|
|
144
|
+
ObjectPattern: {
|
|
145
|
+
multiline: true,
|
|
146
|
+
consistent: true,
|
|
147
|
+
minProperties: 3
|
|
148
|
+
},
|
|
149
|
+
ImportDeclaration: {
|
|
150
|
+
consistent: true,
|
|
151
|
+
multiline: true
|
|
152
|
+
},
|
|
153
|
+
ExportDeclaration: {
|
|
154
|
+
consistent: true,
|
|
155
|
+
multiline: true
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
],
|
|
159
|
+
"style/no-extra-parens": [
|
|
160
|
+
"error",
|
|
161
|
+
"all",
|
|
162
|
+
{
|
|
163
|
+
nestedBinaryExpressions: false,
|
|
164
|
+
ternaryOperandBinaryExpressions: false,
|
|
165
|
+
ignoreJSX: "multi-line"
|
|
166
|
+
}
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
javascript: {
|
|
171
|
+
overrides: {
|
|
172
|
+
"no-duplicate-imports": "off",
|
|
173
|
+
"prefer-object-spread": "error",
|
|
174
|
+
"func-style": [
|
|
175
|
+
"error",
|
|
176
|
+
"declaration",
|
|
177
|
+
{
|
|
178
|
+
allowArrowFunctions: true
|
|
179
|
+
}
|
|
180
|
+
],
|
|
181
|
+
"curly": [
|
|
182
|
+
"error",
|
|
183
|
+
"all"
|
|
184
|
+
],
|
|
185
|
+
"no-useless-escape": "error",
|
|
186
|
+
"no-useless-concat": "error",
|
|
187
|
+
"no-unused-private-class-members": "error",
|
|
188
|
+
"no-unsafe-optional-chaining": "error",
|
|
189
|
+
"no-dupe-else-if": "error",
|
|
190
|
+
"no-eq-null": "error",
|
|
191
|
+
"no-extra-label": "error",
|
|
192
|
+
"no-negated-condition": "error",
|
|
193
|
+
"no-invalid-this": "error",
|
|
194
|
+
"arrow-body-style": [
|
|
195
|
+
"error",
|
|
196
|
+
"as-needed"
|
|
197
|
+
],
|
|
198
|
+
"prefer-object-has-own": "error",
|
|
199
|
+
"prefer-numeric-literals": "error",
|
|
200
|
+
"prefer-named-capture-group": "error",
|
|
201
|
+
"prefer-destructuring": "error",
|
|
202
|
+
"object-shorthand": "error",
|
|
203
|
+
"require-atomic-updates": "error",
|
|
204
|
+
"require-await": "error",
|
|
205
|
+
"camelcase": [
|
|
206
|
+
"error",
|
|
207
|
+
{
|
|
208
|
+
properties: "always",
|
|
209
|
+
ignoreGlobals: true
|
|
210
|
+
}
|
|
211
|
+
],
|
|
212
|
+
"no-promise-executor-return": [
|
|
213
|
+
"error",
|
|
214
|
+
{
|
|
215
|
+
allowVoid: true
|
|
216
|
+
}
|
|
217
|
+
],
|
|
218
|
+
"sort-imports": "off",
|
|
219
|
+
"no-console": "off"
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
typescript: {
|
|
223
|
+
overrides: {
|
|
224
|
+
"ts/no-unused-expressions": [
|
|
225
|
+
"error",
|
|
226
|
+
{
|
|
227
|
+
enforceForJSX: true
|
|
228
|
+
}
|
|
229
|
+
],
|
|
230
|
+
"ts/no-unused-vars": [
|
|
231
|
+
"error",
|
|
232
|
+
{
|
|
233
|
+
args: "after-used",
|
|
234
|
+
caughtErrors: "all",
|
|
235
|
+
destructuredArrayIgnorePattern: "^_",
|
|
236
|
+
ignoreRestSiblings: true
|
|
237
|
+
}
|
|
238
|
+
],
|
|
239
|
+
"ts/array-type": [
|
|
240
|
+
"error",
|
|
241
|
+
{
|
|
242
|
+
default: "array-simple",
|
|
243
|
+
readonly: "array-simple"
|
|
244
|
+
}
|
|
245
|
+
],
|
|
246
|
+
"ts/consistent-type-assertions": [
|
|
247
|
+
"error",
|
|
248
|
+
{
|
|
249
|
+
assertionStyle: "as",
|
|
250
|
+
objectLiteralTypeAssertions: "allow"
|
|
251
|
+
}
|
|
252
|
+
],
|
|
253
|
+
"ts/consistent-type-definitions": [
|
|
254
|
+
"error",
|
|
255
|
+
"interface"
|
|
256
|
+
],
|
|
257
|
+
"ts/max-params": [
|
|
258
|
+
"error",
|
|
259
|
+
{
|
|
260
|
+
max: 5
|
|
261
|
+
}
|
|
262
|
+
]
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
react: {
|
|
266
|
+
overrides: {
|
|
267
|
+
"react-naming-convention/component-name": ["error", "PascalCase"],
|
|
268
|
+
"react-naming-convention/filename-extension": [
|
|
269
|
+
"error",
|
|
270
|
+
{
|
|
271
|
+
allow: "as-needed",
|
|
272
|
+
extensions: [".tsx"]
|
|
273
|
+
}
|
|
274
|
+
],
|
|
275
|
+
"react-hooks-extra/no-redundant-custom-hook": "error",
|
|
276
|
+
"react-hooks-extra/no-unnecessary-use-memo": "error",
|
|
277
|
+
"react-hooks-extra/no-unnecessary-use-callback": "error",
|
|
278
|
+
"react-naming-convention/use-state": "error",
|
|
279
|
+
"react-refresh/only-export-components": "error",
|
|
280
|
+
"react-hooks/exhaustive-deps": [
|
|
281
|
+
"error",
|
|
282
|
+
{
|
|
283
|
+
additionalHooks: "^use(Deep|Shallow)"
|
|
284
|
+
}
|
|
285
|
+
],
|
|
286
|
+
"react/no-clone-element": "off",
|
|
287
|
+
"react/no-class-component": "error",
|
|
288
|
+
"react/no-children-prop": "off",
|
|
289
|
+
"react/no-children-to-array": "off",
|
|
290
|
+
"react/no-children-for-each": "off",
|
|
291
|
+
"react/no-children-count": "off"
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
vue: false,
|
|
295
|
+
jsx: true,
|
|
296
|
+
regexp: true,
|
|
297
|
+
jsonc: true,
|
|
298
|
+
yaml: true,
|
|
299
|
+
toml: true,
|
|
300
|
+
markdown: {
|
|
301
|
+
overrides: {
|
|
302
|
+
"markdown/fenced-code-language": "error",
|
|
303
|
+
"markdown/no-duplicate-headings": "error",
|
|
304
|
+
"markdown/no-empty-links": "error"
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
test: true,
|
|
308
|
+
formatters: {
|
|
309
|
+
markdown: "prettier",
|
|
310
|
+
prettierOptions: {
|
|
311
|
+
singleQuote: false,
|
|
312
|
+
semi: true,
|
|
313
|
+
tabWidth: 2,
|
|
314
|
+
useTabs: false,
|
|
315
|
+
trailingComma: "all",
|
|
316
|
+
endOfLine: "lf",
|
|
317
|
+
printWidth: 160,
|
|
318
|
+
proseWrap: "never",
|
|
319
|
+
arrowParens: "avoid",
|
|
320
|
+
htmlWhitespaceSensitivity: "strict",
|
|
321
|
+
bracketSameLine: true,
|
|
322
|
+
bracketSpacing: true,
|
|
323
|
+
quoteProps: "as-needed",
|
|
324
|
+
jsxSingleQuote: false,
|
|
325
|
+
singleAttributePerLine: false
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
rules: {
|
|
331
|
+
"unicorn/filename-case": [
|
|
332
|
+
"error",
|
|
333
|
+
{
|
|
334
|
+
case: "kebabCase",
|
|
335
|
+
ignore: ["README.md"]
|
|
336
|
+
}
|
|
337
|
+
],
|
|
338
|
+
"unicorn/prefer-date-now": "error",
|
|
339
|
+
"unicorn/prefer-string-trim-start-end": "error",
|
|
340
|
+
"unicorn/prefer-string-raw": "error",
|
|
341
|
+
"unicorn/prefer-object-from-entries": "error",
|
|
342
|
+
"unicorn/prefer-default-parameters": "error",
|
|
343
|
+
"unicorn/prefer-array-find": "error",
|
|
344
|
+
"unicorn/prefer-array-flat": "error",
|
|
345
|
+
"unicorn/prefer-array-flat-map": "error",
|
|
346
|
+
"unicorn/prefer-array-index-of": "error",
|
|
347
|
+
"unicorn/prefer-array-some": "error",
|
|
348
|
+
"unicorn/prefer-logical-operator-over-ternary": "error",
|
|
349
|
+
"unicorn/no-array-push-push": "error",
|
|
350
|
+
"unicorn/no-empty-file": "error",
|
|
351
|
+
"unicorn/no-array-for-each": "error",
|
|
352
|
+
"unicorn/no-for-loop": "error",
|
|
353
|
+
"unicorn/no-unnecessary-await": "error",
|
|
354
|
+
"unicorn/no-unnecessary-polyfills": "error",
|
|
355
|
+
"unicorn/no-useless-undefined": "error",
|
|
356
|
+
"unicorn/no-useless-switch-case": "error",
|
|
357
|
+
"unicorn/no-useless-spread": "error",
|
|
358
|
+
"unicorn/no-console-spaces": "error",
|
|
359
|
+
"unicorn/no-unused-properties": "error",
|
|
360
|
+
"unicorn/no-useless-promise-resolve-reject": "error",
|
|
361
|
+
"import/order": "off",
|
|
362
|
+
"import/first": "error",
|
|
363
|
+
"import/export": "error",
|
|
364
|
+
"import/no-named-as-default": "off",
|
|
365
|
+
"import/no-named-default": "off",
|
|
366
|
+
"perfectionist/sort-imports": [
|
|
367
|
+
"error",
|
|
368
|
+
{
|
|
369
|
+
type: "natural"
|
|
370
|
+
}
|
|
371
|
+
],
|
|
372
|
+
"perfectionist/sort-exports": [
|
|
373
|
+
"error",
|
|
374
|
+
{
|
|
375
|
+
type: "natural"
|
|
376
|
+
}
|
|
377
|
+
],
|
|
378
|
+
"perfectionist/sort-named-imports": [
|
|
379
|
+
"error",
|
|
380
|
+
{
|
|
381
|
+
type: "natural",
|
|
382
|
+
groupKind: "values-first"
|
|
383
|
+
}
|
|
384
|
+
],
|
|
385
|
+
"perfectionist/sort-named-exports": [
|
|
386
|
+
"error",
|
|
387
|
+
{
|
|
388
|
+
type: "natural",
|
|
389
|
+
groupKind: "values-first"
|
|
390
|
+
}
|
|
391
|
+
],
|
|
392
|
+
"eslint-comments/no-unlimited-disable": "off"
|
|
393
|
+
}
|
|
394
|
+
},
|
|
395
|
+
{
|
|
396
|
+
ignores: ["**/*.md", "**/*.md/*.{ts,tsx}", "**/src/pages/__root.{ts,tsx}"],
|
|
397
|
+
rules: {
|
|
398
|
+
"react-naming-convention/filename": [
|
|
399
|
+
"error",
|
|
400
|
+
{
|
|
401
|
+
rule: "kebab-case"
|
|
402
|
+
}
|
|
403
|
+
]
|
|
404
|
+
}
|
|
405
|
+
},
|
|
406
|
+
...pluginRouter.configs["flat/recommended"]
|
|
407
|
+
);
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
export { defineEslintConfig };
|
|
3
411
|
/*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
|
package/es/index.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
2
|
-
export{defineCommitlintConfig}from
|
|
1
|
+
/*! VefFramework version: 1.0.101, build time: 2025-03-07T14:07:15.261Z, made by Venus. */
|
|
2
|
+
export { defineCommitlintConfig } from './commitlint-config.js';
|
|
3
|
+
export { defineConfig } from './config.js';
|
|
4
|
+
export { defineEslintConfig } from './eslint-config.js';
|
|
5
|
+
export { defineStylelintConfig } from './stylelint-config.js';
|
|
6
|
+
export { defineTailwindConfig } from './tailwind-config.js';
|
|
3
7
|
/*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
|
package/es/modules.d.js
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
1
|
+
/*! VefFramework version: 1.0.101, build time: 2025-03-07T14:07:15.261Z, made by Venus. */
|
|
2
|
+
|
|
2
3
|
/*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
|
package/es/plugin-app-config.js
CHANGED
|
@@ -1,3 +1,35 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
2
|
-
import{snake
|
|
1
|
+
/*! VefFramework version: 1.0.101, build time: 2025-03-07T14:07:15.261Z, made by Venus. */
|
|
2
|
+
import { snake } from 'radashi';
|
|
3
|
+
import config from 'unplugin-config/vite';
|
|
4
|
+
import { ENV_APP_PREFIX, DEFAULT_OUTPUT_DIR, DEFAULT_APP_NAME } from './constants.js';
|
|
5
|
+
|
|
6
|
+
function constantCase(value) {
|
|
7
|
+
return snake(value).toUpperCase();
|
|
8
|
+
}
|
|
9
|
+
function createAppConfigPlugin({
|
|
10
|
+
basePublicPath,
|
|
11
|
+
outputDir,
|
|
12
|
+
appName = DEFAULT_APP_NAME
|
|
13
|
+
}) {
|
|
14
|
+
return config({
|
|
15
|
+
appName: `VEF_${constantCase(appName)}`,
|
|
16
|
+
baseDir: basePublicPath,
|
|
17
|
+
configFile: {
|
|
18
|
+
generate: true,
|
|
19
|
+
fileName: "app.config.js",
|
|
20
|
+
outputDir: outputDir ?? DEFAULT_OUTPUT_DIR
|
|
21
|
+
},
|
|
22
|
+
htmlInjection: {
|
|
23
|
+
enable: true,
|
|
24
|
+
position: "head-prepend",
|
|
25
|
+
templates: ["index.html"]
|
|
26
|
+
},
|
|
27
|
+
envVariables: {
|
|
28
|
+
prefix: ENV_APP_PREFIX,
|
|
29
|
+
files: ["env/.env", "env/.env.production"]
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export { createAppConfigPlugin };
|
|
3
35
|
/*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
|
|
@@ -1,3 +1,96 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
2
|
-
import
|
|
1
|
+
/*! VefFramework version: 1.0.101, build time: 2025-03-07T14:07:15.261Z, made by Venus. */
|
|
2
|
+
import process from 'node:process';
|
|
3
|
+
import { DEFAULT_SERVER_PORT, ASSETS_DIR, DEFAULT_OUTPUT_DIR, DEFAULT_APP_NAME, ENV_BUILD_PREFIX, ENV_APP_PREFIX, ENV_DIR } from './constants.js';
|
|
4
|
+
|
|
5
|
+
function createConventionalConfigPlugin({
|
|
6
|
+
appName,
|
|
7
|
+
appVersion,
|
|
8
|
+
basePublicPath,
|
|
9
|
+
projectDir,
|
|
10
|
+
outputDir,
|
|
11
|
+
serverPort,
|
|
12
|
+
proxies
|
|
13
|
+
}) {
|
|
14
|
+
return {
|
|
15
|
+
name: "vef-framework:conventional-config",
|
|
16
|
+
config(_, { command }) {
|
|
17
|
+
const isDev = command === "serve";
|
|
18
|
+
return {
|
|
19
|
+
appType: "spa",
|
|
20
|
+
root: projectDir,
|
|
21
|
+
base: basePublicPath,
|
|
22
|
+
publicDir: "public",
|
|
23
|
+
envDir: ENV_DIR,
|
|
24
|
+
envPrefix: [ENV_BUILD_PREFIX, ENV_APP_PREFIX],
|
|
25
|
+
define: {
|
|
26
|
+
__VEF_FRAMEWORK_VERSION__: `"${process.env.VEF_FRAMEWORK_VERSION}"`,
|
|
27
|
+
__VEF_APP_VERSION__: `"${appVersion}"`,
|
|
28
|
+
__VEF_APP_CONFIG__: isDev ? `
|
|
29
|
+
(function () {
|
|
30
|
+
const env = import.meta.env;
|
|
31
|
+
const config = Object.keys(env).filter(key => key.startsWith(${JSON.stringify(ENV_APP_PREFIX)}))
|
|
32
|
+
.reduce((acc, key) => {
|
|
33
|
+
acc[key] = env[key];
|
|
34
|
+
return acc;
|
|
35
|
+
}, {});
|
|
36
|
+
return Object.freeze(config);
|
|
37
|
+
})()
|
|
38
|
+
` : `window.__PRODUCTION__VEF_${appName ?? DEFAULT_APP_NAME}__CONF__`
|
|
39
|
+
},
|
|
40
|
+
css: {
|
|
41
|
+
modules: {
|
|
42
|
+
scopeBehaviour: "local",
|
|
43
|
+
localsConvention: "camelCase"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
optimizeDeps: {
|
|
47
|
+
include: ["react", "react-dom"]
|
|
48
|
+
},
|
|
49
|
+
esbuild: {
|
|
50
|
+
target: "es2023",
|
|
51
|
+
drop: ["console", "debugger"],
|
|
52
|
+
charset: "utf8"
|
|
53
|
+
},
|
|
54
|
+
build: {
|
|
55
|
+
outDir: outputDir ?? DEFAULT_OUTPUT_DIR,
|
|
56
|
+
target: "modules",
|
|
57
|
+
assetsDir: ASSETS_DIR,
|
|
58
|
+
assetsInlineLimit: 10240,
|
|
59
|
+
reportCompressedSize: false,
|
|
60
|
+
chunkSizeWarningLimit: 2048,
|
|
61
|
+
minify: true,
|
|
62
|
+
sourcemap: false,
|
|
63
|
+
rollupOptions: {
|
|
64
|
+
maxParallelFileOps: 200,
|
|
65
|
+
input: {
|
|
66
|
+
main: "index.html"
|
|
67
|
+
},
|
|
68
|
+
output: {
|
|
69
|
+
banner: `/*! Powered by VEF Framework v${process.env.VEF_FRAMEWORK_VERSION}.${appVersion ? ` App version v${appVersion}.` : ""} Built at ${(/* @__PURE__ */ new Date()).toISOString()} */`,
|
|
70
|
+
chunkFileNames: `${ASSETS_DIR}/js/[name]-[hash].js`,
|
|
71
|
+
entryFileNames: `${ASSETS_DIR}/js/[name]-[hash].js`,
|
|
72
|
+
assetFileNames: `${ASSETS_DIR}/[ext]/[name]-[hash].[ext]`,
|
|
73
|
+
manualChunks: {
|
|
74
|
+
"react": ["react", "react-dom"],
|
|
75
|
+
"vef-shared": ["@vef-framework/shared"],
|
|
76
|
+
"vef-components": ["@vef-framework/components"],
|
|
77
|
+
"vef-hooks": ["@vef-framework/hooks"],
|
|
78
|
+
"vef-core": ["@vef-framework/core"],
|
|
79
|
+
"vef-starter": ["@vef-framework/starter"]
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
server: {
|
|
85
|
+
port: serverPort || DEFAULT_SERVER_PORT,
|
|
86
|
+
host: true,
|
|
87
|
+
open: true,
|
|
88
|
+
proxy: proxies
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export { createConventionalConfigPlugin };
|
|
3
96
|
/*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
|
package/es/plugin-eslint.js
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
-
/*! VefFramework version: 1.0.
|
|
2
|
-
import
|
|
1
|
+
/*! VefFramework version: 1.0.101, build time: 2025-03-07T14:07:15.261Z, made by Venus. */
|
|
2
|
+
import eslint from 'vite-plugin-eslint2';
|
|
3
|
+
|
|
4
|
+
function createEslintPlugin() {
|
|
5
|
+
return eslint({
|
|
6
|
+
fix: true,
|
|
7
|
+
test: false,
|
|
8
|
+
dev: true,
|
|
9
|
+
build: false,
|
|
10
|
+
cache: true,
|
|
11
|
+
cacheLocation: "node_modules/.cache/.eslintcache",
|
|
12
|
+
include: ["*.{js,ts,json,jsonc,yaml,toml,md}", "src/**/*.{ts,tsx,json,jsonc,yaml,toml,md}"],
|
|
13
|
+
exclude: ["node_modules", "virtual:", "vef:"],
|
|
14
|
+
emitError: true,
|
|
15
|
+
emitWarning: true,
|
|
16
|
+
emitWarningAsError: true
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { createEslintPlugin };
|
|
3
21
|
/*! VefFramework is a blazingly high-level, modern, flexible, easy-to-use UI framework made by Venus. Follow me on Github: https://github.com/ilxqx! @ilxqx */
|