@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.
Files changed (53) hide show
  1. package/es/cli.js +225 -2
  2. package/es/commitlint-config.js +11 -2
  3. package/es/config.js +77 -2
  4. package/es/constants.js +14 -2
  5. package/es/eslint-config.js +410 -2
  6. package/es/index.js +6 -2
  7. package/es/modules.d.js +2 -1
  8. package/es/plugin-app-config.js +34 -2
  9. package/es/plugin-conventional-config.js +95 -2
  10. package/es/plugin-eslint.js +20 -2
  11. package/es/plugin-html.js +82 -2
  12. package/es/plugin-icons.js +17 -2
  13. package/es/plugin-injection.js +17 -2
  14. package/es/plugin-inspect.js +11 -2
  15. package/es/plugin-react-swc.js +10 -2
  16. package/es/plugin-router.js +44 -2
  17. package/es/plugin-stylelint.js +20 -2
  18. package/es/plugin-svgr.js +55 -2
  19. package/es/plugin-tailwind.js +8 -2
  20. package/es/plugin-tailwindcss.js +21 -2
  21. package/es/plugin-tsconfig-paths.js +10 -2
  22. package/es/plugin-visualizer.js +12 -2
  23. package/es/plugin-webfont.js +11 -2
  24. package/es/stylelint-config.js +64 -2
  25. package/es/tailwind-config.js +392 -2
  26. package/lib/cli.cjs +227 -2
  27. package/lib/commitlint-config.cjs +15 -2
  28. package/lib/config.cjs +81 -2
  29. package/lib/constants.cjs +28 -2
  30. package/lib/eslint-config.cjs +414 -2
  31. package/lib/index.cjs +18 -2
  32. package/lib/modules.d.cjs +4 -2
  33. package/lib/plugin-app-config.cjs +38 -2
  34. package/lib/plugin-conventional-config.cjs +99 -2
  35. package/lib/plugin-eslint.cjs +24 -2
  36. package/lib/plugin-html.cjs +86 -2
  37. package/lib/plugin-icons.cjs +22 -2
  38. package/lib/plugin-injection.cjs +21 -2
  39. package/lib/plugin-inspect.cjs +15 -2
  40. package/lib/plugin-react-swc.cjs +14 -2
  41. package/lib/plugin-router.cjs +48 -2
  42. package/lib/plugin-stylelint.cjs +24 -2
  43. package/lib/plugin-svgr.cjs +59 -2
  44. package/lib/plugin-tailwind.cjs +12 -2
  45. package/lib/plugin-tailwindcss.cjs +25 -2
  46. package/lib/plugin-tsconfig-paths.cjs +14 -2
  47. package/lib/plugin-visualizer.cjs +16 -2
  48. package/lib/plugin-webfont.cjs +15 -2
  49. package/lib/stylelint-config.cjs +68 -2
  50. package/lib/tailwind-config.cjs +396 -2
  51. package/lib/types.cjs +4 -2
  52. package/package.json +1 -1
  53. package/template/_package.json +5 -5
@@ -1,3 +1,16 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.492Z, made by Venus. */
2
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),exports.defineCommitlintConfig=function defineCommitlintConfig(){return{extends:["@commitlint/config-conventional"],formatter:"@commitlint/format"}};
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.100, build time: 2025-03-07T13:52:53.492Z, made by Venus. */
2
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("consola"),i=require("fs-extra"),r=require("node:path"),n=require("vite"),t=require("./constants.cjs"),u=require("./plugin-app-config.cjs"),c=require("./plugin-conventional-config.cjs"),s=require("./plugin-eslint.cjs"),o=require("./plugin-html.cjs"),l=require("./plugin-icons.cjs"),a=require("./plugin-injection.cjs"),g=require("./plugin-inspect.cjs"),p=require("./plugin-react-swc.cjs"),P=require("./plugin-router.cjs"),j=require("./plugin-stylelint.cjs"),_=require("./plugin-svgr.cjs"),f=require("./plugin-tailwind.cjs"),q=require("./plugin-tailwindcss.cjs"),d=require("./plugin-tsconfig-paths.cjs"),E=require("./plugin-visualizer.cjs"),v=require("./plugin-webfont.cjs"),{readJson:I}=i;exports.defineConfig=function defineConfig({projectDir:i,proxies:b,visualizer:D=!1,routerHistory:U="browser",autoCodeSplitting:V=!0}){return n.defineConfig((async({mode:B})=>{const T=n.loadEnv(B,t.ENV_DIR,t.ENV_BUILD_PREFIX);Object.keys(T).length>0&&(e.info("Loaded environment variables:"),console.table(T));const w=await async function getAppVersion(e){const i=await I(r.resolve(e,"package.json"),{encoding:"utf-8"});return i.version}(i);return{plugins:[g.createInspectPlugin(),c.createConventionalConfigPlugin({appVersion:w,projectDir:i,basePublicPath:T.VEF_BUILD_BASE_PUBLIC_PATH,outputDir:T.VEF_BUILD_OUTPUT_DIR,serverPort:Number(T.VEF_BUILD_SERVER_PORT),proxies:b}),p.createReactSwcPlugin(),d.createTsconfigPathsPlugin(i),o.createHtmlPlugin(),f.createTailwindPlugin(),q.createTailwindcssPlugin(),a.createInjectionPlugin(),u.createAppConfigPlugin({basePublicPath:T.VEF_BUILD_BASE_PUBLIC_PATH,outputDir:T.VEF_BUILD_OUTPUT_DIR,appName:T.VEF_APP_NAME}),l.createIconsPlugin(i),_.createSvgrPlugin(),v.createWebfontPlugin(),P.createRouterPlugin(i,U,V),s.createEslintPlugin(),j.createStylelintPlugin(),D?E.createVisualizerPlugin(i):void 0].filter(Boolean)}}))};
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.100, build time: 2025-03-07T13:52:53.492Z, made by Venus. */
2
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});exports.ASSETS_DIR="assets",exports.DEFAULT_APP_NAME="APP",exports.DEFAULT_OUTPUT_DIR="dist",exports.DEFAULT_SERVER_PORT=3833,exports.ENV_APP_PREFIX="VEF_APP_",exports.ENV_BUILD_PREFIX="VEF_BUILD_",exports.ENV_DIR="env",exports.PAGES_DIR="pages",exports.PUBLIC_DIR="public",exports.ROUTER_DIR="router",exports.SRC_DIR="src";
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 */
@@ -1,3 +1,415 @@
1
- /*! VefFramework version: 1.0.100, build time: 2025-03-07T13:52:53.492Z, made by Venus. */
2
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("@antfu/eslint-config"),e=require("@tanstack/eslint-plugin-router");exports.defineEslintConfig=function defineEslintConfig(){return r.antfu({ignores:["**/node_modules","**/dist","**/public"],stylistic:{indent:2,jsx:!0,quotes:"double",semi:!0,overrides:{"style/line-comment-position":["error",{position:"above"}],"style/jsx-self-closing-comp":["error",{component:!0,html:!0}],"style/jsx-newline":["error",{prevent:!0,allowMultilines:!0}],"style/jsx-props-no-multi-spaces":"error","style/jsx-sort-props":["error",{callbacksLast:!0,shorthandFirst:!0,shorthandLast:!1,multiline:"last",ignoreCase:!0,noSortAlphabetically:!1,reservedFirst:["key","ref"]}],"style/newline-per-chained-call":["error",{ignoreChainWithDepth:3}],"style/object-property-newline":"error","style/brace-style":["error","1tbs"],"style/arrow-parens":["error","as-needed"],"style/multiline-comment-style":["error","separate-lines",{checkJSDoc:!1}],"style/implicit-arrow-linebreak":["error","beside"],"style/no-extra-semi":"error","style/array-element-newline":["error",{consistent:!0,multiline:!0,minItems:7}],"style/function-call-argument-newline":["error","consistent"],"style/padding-line-between-statements":["error",{blankLine:"always",prev:"*",next:["block","multiline-block-like","type","interface","enum","function","function-overload"]},{blankLine:"always",prev:["block","multiline-block-like","type","interface","enum","function","function-overload"],next:"*"}],"style/jsx-pascal-case":["error",{allowAllCaps:!1,allowLeadingUnderscore:!1,allowNamespace:!1,ignore:[]}],"style/switch-colon-spacing":["error",{before:!1,after:!0}],"style/object-curly-newline":["error",{ObjectExpression:{multiline:!0,consistent:!0,minProperties:3},ObjectPattern:{multiline:!0,consistent:!0,minProperties:3},ImportDeclaration:{consistent:!0,multiline:!0},ExportDeclaration:{consistent:!0,multiline:!0}}],"style/no-extra-parens":["error","all",{nestedBinaryExpressions:!1,ternaryOperandBinaryExpressions:!1,ignoreJSX:"multi-line"}]}},javascript:{overrides:{"no-duplicate-imports":"off","prefer-object-spread":"error","func-style":["error","declaration",{allowArrowFunctions:!0}],curly:["error","all"],"no-useless-escape":"error","no-useless-concat":"error","no-unused-private-class-members":"error","no-unsafe-optional-chaining":"error","no-dupe-else-if":"error","no-eq-null":"error","no-extra-label":"error","no-negated-condition":"error","no-invalid-this":"error","arrow-body-style":["error","as-needed"],"prefer-object-has-own":"error","prefer-numeric-literals":"error","prefer-named-capture-group":"error","prefer-destructuring":"error","object-shorthand":"error","require-atomic-updates":"error","require-await":"error",camelcase:["error",{properties:"always",ignoreGlobals:!0}],"no-promise-executor-return":["error",{allowVoid:!0}],"sort-imports":"off","no-console":"off"}},typescript:{overrides:{"ts/no-unused-expressions":["error",{enforceForJSX:!0}],"ts/no-unused-vars":["error",{args:"after-used",caughtErrors:"all",destructuredArrayIgnorePattern:"^_",ignoreRestSiblings:!0}],"ts/array-type":["error",{default:"array-simple",readonly:"array-simple"}],"ts/consistent-type-assertions":["error",{assertionStyle:"as",objectLiteralTypeAssertions:"allow"}],"ts/consistent-type-definitions":["error","interface"],"ts/max-params":["error",{max:5}]}},react:{overrides:{"react-naming-convention/component-name":["error","PascalCase"],"react-naming-convention/filename-extension":["error",{allow:"as-needed",extensions:[".tsx"]}],"react-hooks-extra/no-redundant-custom-hook":"error","react-hooks-extra/no-unnecessary-use-memo":"error","react-hooks-extra/no-unnecessary-use-callback":"error","react-naming-convention/use-state":"error","react-refresh/only-export-components":"error","react-hooks/exhaustive-deps":["error",{additionalHooks:"^use(Deep|Shallow)"}],"react/no-clone-element":"off","react/no-class-component":"error","react/no-children-prop":"off","react/no-children-to-array":"off","react/no-children-for-each":"off","react/no-children-count":"off"}},vue:!1,jsx:!0,regexp:!0,jsonc:!0,yaml:!0,toml:!0,markdown:{overrides:{"markdown/fenced-code-language":"error","markdown/no-duplicate-headings":"error","markdown/no-empty-links":"error"}},test:!0,formatters:{markdown:"prettier",prettierOptions:{singleQuote:!1,semi:!0,tabWidth:2,useTabs:!1,trailingComma:"all",endOfLine:"lf",printWidth:160,proseWrap:"never",arrowParens:"avoid",htmlWhitespaceSensitivity:"strict",bracketSameLine:!0,bracketSpacing:!0,quoteProps:"as-needed",jsxSingleQuote:!1,singleAttributePerLine:!1}}},{rules:{"unicorn/filename-case":["error",{case:"kebabCase",ignore:["README.md"]}],"unicorn/prefer-date-now":"error","unicorn/prefer-string-trim-start-end":"error","unicorn/prefer-string-raw":"error","unicorn/prefer-object-from-entries":"error","unicorn/prefer-default-parameters":"error","unicorn/prefer-array-find":"error","unicorn/prefer-array-flat":"error","unicorn/prefer-array-flat-map":"error","unicorn/prefer-array-index-of":"error","unicorn/prefer-array-some":"error","unicorn/prefer-logical-operator-over-ternary":"error","unicorn/no-array-push-push":"error","unicorn/no-empty-file":"error","unicorn/no-array-for-each":"error","unicorn/no-for-loop":"error","unicorn/no-unnecessary-await":"error","unicorn/no-unnecessary-polyfills":"error","unicorn/no-useless-undefined":"error","unicorn/no-useless-switch-case":"error","unicorn/no-useless-spread":"error","unicorn/no-console-spaces":"error","unicorn/no-unused-properties":"error","unicorn/no-useless-promise-resolve-reject":"error","import/order":"off","import/first":"error","import/export":"error","import/no-named-as-default":"off","import/no-named-default":"off","perfectionist/sort-imports":["error",{type:"natural"}],"perfectionist/sort-exports":["error",{type:"natural"}],"perfectionist/sort-named-imports":["error",{type:"natural",groupKind:"values-first"}],"perfectionist/sort-named-exports":["error",{type:"natural",groupKind:"values-first"}],"eslint-comments/no-unlimited-disable":"off"}},{ignores:["**/*.md","**/*.md/*.{ts,tsx}","**/src/pages/__root.{ts,tsx}"],rules:{"react-naming-convention/filename":["error",{rule:"kebab-case"}]}},...e.configs["flat/recommended"])};
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.100, build time: 2025-03-07T13:52:53.492Z, made by Venus. */
2
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./commitlint-config.cjs"),e=require("./config.cjs"),n=require("./eslint-config.cjs"),o=require("./stylelint-config.cjs"),t=require("./tailwind-config.cjs");exports.defineCommitlintConfig=i.defineCommitlintConfig,exports.defineConfig=e.defineConfig,exports.defineEslintConfig=n.defineEslintConfig,exports.defineStylelintConfig=o.defineStylelintConfig,exports.defineTailwindConfig=t.defineTailwindConfig;
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.100, build time: 2025-03-07T13:52:53.492Z, made by Venus. */
2
- "use strict";
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.100, build time: 2025-03-07T13:52:53.492Z, made by Venus. */
2
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("radashi"),i=require("unplugin-config/vite"),n=require("./constants.cjs");exports.createAppConfigPlugin=function createAppConfigPlugin({basePublicPath:t,outputDir:r,appName:a=n.DEFAULT_APP_NAME}){return i({appName:`VEF_${p=a,e.snake(p).toUpperCase()}`,baseDir:t,configFile:{generate:!0,fileName:"app.config.js",outputDir:r??n.DEFAULT_OUTPUT_DIR},htmlInjection:{enable:!0,position:"head-prepend",templates:["index.html"]},envVariables:{prefix:n.ENV_APP_PREFIX,files:["env/.env","env/.env.production"]}});var p};
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 */