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