@vef-framework/dev 2.0.11 → 2.1.0
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/dist/cjs/_internal/_rolldown/runtime.cjs +1 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/lint/commitlint.cjs +1 -1
- package/dist/cjs/lint/eslint.cjs +1 -1
- package/dist/cjs/lint/index.cjs +1 -1
- package/dist/cjs/lint/local-react-plugin.cjs +1 -0
- package/dist/cjs/lint/stylelint.cjs +1 -1
- package/dist/cjs/vite/chunks.cjs +1 -1
- package/dist/cjs/vite/config.cjs +1 -1
- package/dist/cjs/vite/constants.cjs +1 -1
- package/dist/cjs/vite/define.cjs +10 -11
- package/dist/cjs/vite/index.cjs +1 -1
- package/dist/cjs/vite/plugin-app-config.cjs +1 -1
- package/dist/cjs/vite/plugin-auto-enhance/core.cjs +1 -1
- package/dist/cjs/vite/plugin-auto-enhance/index.cjs +1 -1
- package/dist/cjs/vite/plugin-auto-enhance/plugins/index.cjs +1 -1
- package/dist/cjs/vite/plugin-auto-enhance/plugins/operation-column-width.cjs +1 -1
- package/dist/cjs/vite/plugin-conventional-config.cjs +1 -1
- package/dist/cjs/vite/plugin-eslint.cjs +1 -1
- package/dist/cjs/vite/plugin-html.cjs +2 -2
- package/dist/cjs/vite/plugin-icons.cjs +1 -1
- package/dist/cjs/vite/plugin-injection.cjs +1 -1
- package/dist/cjs/vite/plugin-inspect.cjs +1 -1
- package/dist/cjs/vite/plugin-react.cjs +1 -1
- package/dist/cjs/vite/plugin-router.cjs +3 -3
- package/dist/cjs/vite/plugin-stylelint.cjs +1 -1
- package/dist/cjs/vite/plugin-svgr.cjs +1 -1
- package/dist/cjs/vite/plugin-tsconfig-paths.cjs +1 -1
- package/dist/cjs/vite/postcss.cjs +1 -1
- package/dist/cli/index.js +5 -5
- package/dist/es/index.js +8 -10
- package/dist/es/lint/commitlint.js +5 -4
- package/dist/es/lint/eslint.js +650 -931
- package/dist/es/lint/index.js +3 -8
- package/dist/es/lint/local-react-plugin.js +42 -0
- package/dist/es/lint/stylelint.js +55 -74
- package/dist/es/vite/chunks.js +19 -16
- package/dist/es/vite/config.js +59 -66
- package/dist/es/vite/constants.js +9 -9
- package/dist/es/vite/define.js +16 -16
- package/dist/es/vite/index.js +1 -4
- package/dist/es/vite/plugin-app-config.js +10 -14
- package/dist/es/vite/plugin-auto-enhance/core.js +85 -85
- package/dist/es/vite/plugin-auto-enhance/index.js +13 -14
- package/dist/es/vite/plugin-auto-enhance/plugins/index.js +1 -4
- package/dist/es/vite/plugin-auto-enhance/plugins/operation-column-width.js +174 -108
- package/dist/es/vite/plugin-conventional-config.js +28 -42
- package/dist/es/vite/plugin-eslint.js +9 -4
- package/dist/es/vite/plugin-html.js +50 -53
- package/dist/es/vite/plugin-icons.js +6 -5
- package/dist/es/vite/plugin-injection.js +1 -11
- package/dist/es/vite/plugin-react.js +21 -63
- package/dist/es/vite/plugin-router.js +38 -31
- package/dist/es/vite/plugin-stylelint.js +9 -4
- package/dist/es/vite/plugin-svgr.js +2 -7
- package/dist/es/vite/plugin-tsconfig-paths.js +3 -6
- package/dist/types/src/lint/commitlint.d.ts +2 -0
- package/dist/types/src/lint/local-react-plugin.d.ts +29 -0
- package/dist/types/src/lint/stylelint.d.ts +2 -0
- package/dist/types/{vite → src/vite}/chunks.d.ts +0 -5
- package/dist/types/src/vite/config.d.ts +12 -0
- package/dist/types/src/vite/constants.d.ts +12 -0
- package/dist/types/src/vite/define.d.ts +4 -0
- package/dist/types/src/vite/plugin-app-config.d.ts +19 -0
- package/dist/types/{vite → src/vite}/plugin-auto-enhance/core.d.ts +6 -21
- package/dist/types/src/vite/plugin-auto-enhance/index.d.ts +10 -0
- package/dist/types/src/vite/plugin-auto-enhance/plugins/operation-column-width.d.ts +5 -0
- package/dist/types/{vite → src/vite}/plugin-auto-enhance/types.d.ts +7 -9
- package/dist/types/{vite → src/vite}/plugin-conventional-config.d.ts +1 -14
- package/dist/types/src/vite/plugin-eslint.d.ts +7 -0
- package/dist/types/src/vite/plugin-html.d.ts +7 -0
- package/dist/types/{vite → src/vite}/plugin-icons.d.ts +3 -3
- package/dist/types/src/vite/plugin-injection.d.ts +5 -0
- package/dist/types/src/vite/plugin-inspect.d.ts +5 -0
- package/dist/types/{vite → src/vite}/plugin-react.d.ts +10 -5
- package/dist/types/src/vite/plugin-router.d.ts +14 -0
- package/dist/types/src/vite/plugin-stylelint.d.ts +7 -0
- package/dist/types/src/vite/plugin-svgr.d.ts +7 -0
- package/dist/types/src/vite/plugin-tsconfig-paths.d.ts +8 -0
- package/dist/types/{vite → src/vite}/postcss.d.ts +0 -5
- package/package.json +65 -65
- package/tsconfig.base.json +0 -1
- package/dist/types/lint/commitlint.d.ts +0 -8
- package/dist/types/lint/stylelint.d.ts +0 -7
- package/dist/types/vite/config.d.ts +0 -39
- package/dist/types/vite/constants.d.ts +0 -48
- package/dist/types/vite/define.d.ts +0 -12
- package/dist/types/vite/plugin-app-config.d.ts +0 -28
- package/dist/types/vite/plugin-auto-enhance/index.d.ts +0 -30
- package/dist/types/vite/plugin-auto-enhance/plugins/operation-column-width.d.ts +0 -14
- package/dist/types/vite/plugin-eslint.d.ts +0 -7
- package/dist/types/vite/plugin-html.d.ts +0 -7
- package/dist/types/vite/plugin-injection.d.ts +0 -7
- package/dist/types/vite/plugin-inspect.d.ts +0 -7
- package/dist/types/vite/plugin-router.d.ts +0 -9
- package/dist/types/vite/plugin-stylelint.d.ts +0 -7
- package/dist/types/vite/plugin-svgr.d.ts +0 -7
- package/dist/types/vite/plugin-tsconfig-paths.d.ts +0 -8
- package/dist/types/{cli → src/cli}/index.d.ts +0 -0
- package/dist/types/{index.d.ts → src/index.d.ts} +0 -0
- package/dist/types/{lint → src/lint}/eslint.d.ts +0 -0
- package/dist/types/{lint → src/lint}/index.d.ts +0 -0
- package/dist/types/{vite → src/vite}/index.d.ts +1 -1
- /package/dist/types/{vite → src/vite}/plugin-auto-enhance/plugins/index.d.ts +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Plugin } from 'vite';
|
|
2
|
+
import { AutoEnhanceOptions } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Create auto-enhance plugin for AST transformations.
|
|
5
|
+
* Supports registering multiple sub-plugins to handle different code enhancement needs.
|
|
6
|
+
*/
|
|
7
|
+
export declare function createAutoEnhancePlugin({ plugins, ...options }?: AutoEnhanceOptions): Plugin;
|
|
8
|
+
export * from './plugins';
|
|
9
|
+
export type * from './types';
|
|
10
|
+
export { types } from 'recast';
|
|
@@ -4,7 +4,7 @@ import { types } from 'recast';
|
|
|
4
4
|
*/
|
|
5
5
|
export interface AutoEnhanceContext {
|
|
6
6
|
/**
|
|
7
|
-
* File ID
|
|
7
|
+
* File ID (full path)
|
|
8
8
|
*/
|
|
9
9
|
id: string;
|
|
10
10
|
/**
|
|
@@ -47,19 +47,17 @@ export interface AutoEnhancePlugin {
|
|
|
47
47
|
description?: string;
|
|
48
48
|
/**
|
|
49
49
|
* Whether this file should be processed
|
|
50
|
-
*
|
|
51
|
-
* @param context Context information
|
|
52
|
-
* @returns Whether to process
|
|
53
50
|
*/
|
|
54
51
|
shouldProcess?: (context: AutoEnhanceContext) => boolean;
|
|
55
52
|
/**
|
|
56
53
|
* Execute transformation
|
|
57
|
-
*
|
|
58
|
-
* @param context Context information
|
|
59
|
-
* @returns Transform result
|
|
60
54
|
*/
|
|
61
55
|
transform: (context: AutoEnhanceContext) => TransformResult;
|
|
62
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* File pattern type for include/exclude options
|
|
59
|
+
*/
|
|
60
|
+
export type FilePattern = string | RegExp | Array<string | RegExp>;
|
|
63
61
|
/**
|
|
64
62
|
* Auto-enhance plugin configuration
|
|
65
63
|
*/
|
|
@@ -71,11 +69,11 @@ export interface AutoEnhanceOptions {
|
|
|
71
69
|
/**
|
|
72
70
|
* File filter, only process matching files
|
|
73
71
|
*/
|
|
74
|
-
include?:
|
|
72
|
+
include?: FilePattern;
|
|
75
73
|
/**
|
|
76
74
|
* File excluder, skip matching files
|
|
77
75
|
*/
|
|
78
|
-
exclude?:
|
|
76
|
+
exclude?: FilePattern;
|
|
79
77
|
/**
|
|
80
78
|
* Custom log prefix
|
|
81
79
|
*/
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { Plugin, ProxyOptions } from 'vite';
|
|
2
|
-
/**
|
|
3
|
-
* The options of the vite plugin for the conventional config
|
|
4
|
-
*/
|
|
5
2
|
export interface PluginConventionalConfigOptions {
|
|
6
3
|
/**
|
|
7
4
|
* The name of the app
|
|
@@ -33,16 +30,6 @@ export interface PluginConventionalConfigOptions {
|
|
|
33
30
|
proxies?: Record<string, string | ProxyOptions>;
|
|
34
31
|
}
|
|
35
32
|
/**
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* @param options - The options of the plugin
|
|
39
|
-
* @param options.appName - The name of the app
|
|
40
|
-
* @param options.appVersion - The version of the app
|
|
41
|
-
* @param options.basePublicPath - The base public path
|
|
42
|
-
* @param options.projectDir - The directory of the project
|
|
43
|
-
* @param options.outputDir - The output directory of the build
|
|
44
|
-
* @param options.serverPort - The port of the server
|
|
45
|
-
* @param options.proxies - The proxies of the server
|
|
46
|
-
* @returns The plugin
|
|
33
|
+
* Create the conventional config plugin with VEF Framework defaults
|
|
47
34
|
*/
|
|
48
35
|
export declare function createConventionalConfigPlugin({ appName, appVersion, basePublicPath, projectDir, outputDir, serverPort, proxies }: PluginConventionalConfigOptions): Plugin;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PluginOption } from 'vite';
|
|
2
2
|
/**
|
|
3
|
-
* Create the icons plugin
|
|
3
|
+
* Create the icons plugin for loading icon sets as React components
|
|
4
4
|
*
|
|
5
5
|
* @param projectDir - The project directory
|
|
6
6
|
* @returns The icons plugin
|
|
7
7
|
*/
|
|
8
|
-
export declare function createIconsPlugin(projectDir: string):
|
|
8
|
+
export declare function createIconsPlugin(projectDir: string): PluginOption;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { PluginOption } from 'vite';
|
|
2
|
+
/**
|
|
3
|
+
* Babel plugin configuration type
|
|
4
|
+
*/
|
|
5
|
+
type BabelPlugin = string | [string, Record<string, unknown>];
|
|
3
6
|
/**
|
|
4
7
|
* The react plugin options
|
|
5
8
|
*/
|
|
@@ -15,11 +18,13 @@ export interface ReactPluginOptions {
|
|
|
15
18
|
/**
|
|
16
19
|
* The babel plugins to use
|
|
17
20
|
*/
|
|
18
|
-
babelPlugins?:
|
|
21
|
+
babelPlugins?: BabelPlugin[];
|
|
19
22
|
}
|
|
20
23
|
/**
|
|
21
|
-
*
|
|
24
|
+
* Create the React Vite plugin
|
|
22
25
|
*
|
|
26
|
+
* @param options - Plugin configuration options
|
|
23
27
|
* @returns The react plugin
|
|
24
28
|
*/
|
|
25
|
-
export declare function createReactPlugin({ useEmotion, useCompiler, babelPlugins }?: ReactPluginOptions):
|
|
29
|
+
export declare function createReactPlugin({ useEmotion, useCompiler, babelPlugins }?: ReactPluginOptions): PluginOption;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PluginOption } from 'vite';
|
|
2
|
+
/**
|
|
3
|
+
* Router history mode type
|
|
4
|
+
*/
|
|
5
|
+
type HistoryMode = "hash" | "browser";
|
|
6
|
+
/**
|
|
7
|
+
* Create the TanStack Router plugin for file-based routing
|
|
8
|
+
*
|
|
9
|
+
* @param projectDir - The project directory
|
|
10
|
+
* @param history - The history mode to use (hash or browser)
|
|
11
|
+
* @returns The router plugin
|
|
12
|
+
*/
|
|
13
|
+
export declare function createRouterPlugin(projectDir: string, history?: HistoryMode): PluginOption;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { UserConfig } from 'vite';
|
|
2
|
+
/**
|
|
3
|
+
* Vite 8 supports tsconfig path resolution natively via `resolve.tsconfigPaths`.
|
|
4
|
+
*
|
|
5
|
+
* This helper keeps the migration logic in one place without relying on the
|
|
6
|
+
* deprecated external plugin.
|
|
7
|
+
*/
|
|
8
|
+
export declare function createTsconfigPathsResolveConfig(): Pick<NonNullable<UserConfig["resolve"]>, "tsconfigPaths">;
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import { UserConfig } from 'vite';
|
|
2
2
|
type PostcssConfig = Exclude<NonNullable<UserConfig["css"]>["postcss"], string | undefined>;
|
|
3
|
-
/**
|
|
4
|
-
* Create the postcss config
|
|
5
|
-
*
|
|
6
|
-
* @returns The postcss config
|
|
7
|
-
*/
|
|
8
3
|
export declare function createPostcssConfig(): PostcssConfig;
|
|
9
4
|
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vef-framework/dev",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.0
|
|
4
|
+
"version": "2.1.0",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "Dev tools for VEF framework",
|
|
7
7
|
"author": {
|
|
@@ -20,15 +20,10 @@
|
|
|
20
20
|
"sideEffects": false,
|
|
21
21
|
"exports": {
|
|
22
22
|
".": {
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
},
|
|
28
|
-
"require": {
|
|
29
|
-
"types": "./dist/types/index.d.ts",
|
|
30
|
-
"default": "./dist/cjs/index.cjs"
|
|
31
|
-
}
|
|
23
|
+
"vef": "./src/index.ts",
|
|
24
|
+
"types": "./dist/types/src/index.d.ts",
|
|
25
|
+
"import": "./dist/es/index.js",
|
|
26
|
+
"require": "./dist/cjs/index.cjs"
|
|
32
27
|
},
|
|
33
28
|
"./types": {
|
|
34
29
|
"types": "./types.d.ts"
|
|
@@ -38,7 +33,7 @@
|
|
|
38
33
|
},
|
|
39
34
|
"main": "dist/cjs/index.cjs",
|
|
40
35
|
"module": "dist/es/index.js",
|
|
41
|
-
"types": "dist/types/index.d.ts",
|
|
36
|
+
"types": "dist/types/src/index.d.ts",
|
|
42
37
|
"bin": {
|
|
43
38
|
"vef": "bin/vef.js"
|
|
44
39
|
},
|
|
@@ -55,81 +50,86 @@
|
|
|
55
50
|
},
|
|
56
51
|
"peerDependencies": {
|
|
57
52
|
"@commitlint/cli": "^20.1.0",
|
|
58
|
-
"@stylistic/stylelint-config": "^
|
|
59
|
-
"eslint": "^
|
|
53
|
+
"@stylistic/stylelint-config": "^4.0.0",
|
|
54
|
+
"eslint": "^10.0.0",
|
|
60
55
|
"husky": "^9.1.7",
|
|
61
|
-
"lint-staged": "^16.
|
|
62
|
-
"stylelint": "^
|
|
63
|
-
"stylelint-config-recess-order": "^7.
|
|
64
|
-
"stylelint-config-recommended": "^
|
|
65
|
-
"stylelint-config-standard-scss": "^
|
|
66
|
-
"stylelint-order": "^
|
|
67
|
-
"vite": "^
|
|
56
|
+
"lint-staged": "^16.0.0",
|
|
57
|
+
"stylelint": "^17.0.0",
|
|
58
|
+
"stylelint-config-recess-order": "^7.0.0",
|
|
59
|
+
"stylelint-config-recommended": "^18.0.0",
|
|
60
|
+
"stylelint-config-standard-scss": "^17.0.0",
|
|
61
|
+
"stylelint-order": "^8.0.0",
|
|
62
|
+
"vite": "^8.0.0"
|
|
68
63
|
},
|
|
69
64
|
"dependencies": {
|
|
70
|
-
"@babel/core": "^7.
|
|
71
|
-
"@babel/parser": "^7.
|
|
72
|
-
"@babel/traverse": "^7.
|
|
73
|
-
"@commitlint/config-conventional": "^20.
|
|
65
|
+
"@babel/core": "^7.29.0",
|
|
66
|
+
"@babel/parser": "^7.29.2",
|
|
67
|
+
"@babel/traverse": "^7.29.0",
|
|
68
|
+
"@commitlint/config-conventional": "^20.5.0",
|
|
74
69
|
"@emotion/babel-plugin": "^11.13.5",
|
|
75
|
-
"@eslint-community/eslint-plugin-eslint-comments": "^4.
|
|
76
|
-
"@eslint-react/eslint-plugin": "^
|
|
77
|
-
"@eslint/js": "^
|
|
78
|
-
"@
|
|
70
|
+
"@eslint-community/eslint-plugin-eslint-comments": "^4.7.1",
|
|
71
|
+
"@eslint-react/eslint-plugin": "^3.0.0",
|
|
72
|
+
"@eslint/js": "^10.0.1",
|
|
73
|
+
"@rolldown/plugin-babel": "^0.2.2",
|
|
74
|
+
"@stylistic/eslint-plugin": "^5.10.0",
|
|
79
75
|
"@svgr/plugin-svgo": "^8.1.0",
|
|
80
|
-
"@tanstack/eslint-plugin-query": "^5.
|
|
81
|
-
"@tanstack/eslint-plugin-router": "^1.
|
|
82
|
-
"@tanstack/router-plugin": "^1.
|
|
83
|
-
"@
|
|
76
|
+
"@tanstack/eslint-plugin-query": "^5.95.2",
|
|
77
|
+
"@tanstack/eslint-plugin-router": "^1.161.6",
|
|
78
|
+
"@tanstack/router-plugin": "^1.167.4",
|
|
79
|
+
"@typescript-eslint/utils": "^8.57.2",
|
|
80
|
+
"@vitejs/plugin-react": "^6.0.1",
|
|
84
81
|
"babel-plugin-react-compiler": "1.0.0",
|
|
85
82
|
"chalk": "^5.6.2",
|
|
86
|
-
"commander": "^14.0.
|
|
83
|
+
"commander": "^14.0.3",
|
|
87
84
|
"consola": "^3.4.2",
|
|
88
|
-
"dotenv": "^17.
|
|
89
|
-
"eslint-config-flat-gitignore": "^2.
|
|
90
|
-
"eslint-plugin-antfu": "^3.
|
|
91
|
-
"eslint-plugin-format": "^
|
|
92
|
-
"eslint-plugin-import-lite": "^0.
|
|
93
|
-
"eslint-plugin-perfectionist": "^
|
|
85
|
+
"dotenv": "^17.3.1",
|
|
86
|
+
"eslint-config-flat-gitignore": "^2.3.0",
|
|
87
|
+
"eslint-plugin-antfu": "^3.2.2",
|
|
88
|
+
"eslint-plugin-format": "^2.0.1",
|
|
89
|
+
"eslint-plugin-import-lite": "^0.6.0",
|
|
90
|
+
"eslint-plugin-perfectionist": "^5.7.0",
|
|
91
|
+
"eslint-plugin-react-dom": "^3.0.0",
|
|
94
92
|
"eslint-plugin-react-hooks": "7.0.1",
|
|
95
|
-
"eslint-plugin-react-
|
|
96
|
-
"eslint-plugin-
|
|
97
|
-
"eslint-plugin-
|
|
98
|
-
"eslint-plugin-
|
|
93
|
+
"eslint-plugin-react-naming-convention": "^3.0.0",
|
|
94
|
+
"eslint-plugin-react-web-api": "^3.0.0",
|
|
95
|
+
"eslint-plugin-regexp": "^3.1.0",
|
|
96
|
+
"eslint-plugin-unicorn": "^63.0.0",
|
|
97
|
+
"eslint-plugin-unused-imports": "^4.4.1",
|
|
99
98
|
"execa": "^9.6.1",
|
|
100
|
-
"fs-extra": "^11.3.
|
|
99
|
+
"fs-extra": "^11.3.4",
|
|
101
100
|
"html-minifier-terser": "^7.2.0",
|
|
102
|
-
"
|
|
101
|
+
"jotai-babel": "^0.1.0",
|
|
102
|
+
"ora": "^9.3.0",
|
|
103
103
|
"prompts": "^2.4.2",
|
|
104
|
-
"radashi": "^12.7.
|
|
104
|
+
"radashi": "^12.7.2",
|
|
105
105
|
"recast": "^0.23.11",
|
|
106
|
-
"sass-embedded": "^1.
|
|
107
|
-
"typescript-eslint": "^8.
|
|
106
|
+
"sass-embedded": "^1.98.0",
|
|
107
|
+
"typescript-eslint": "^8.57.2",
|
|
108
108
|
"unplugin-config": "^0.1.5",
|
|
109
|
-
"unplugin-icons": "^
|
|
110
|
-
"vite-plugin-eslint2": "^5.0
|
|
109
|
+
"unplugin-icons": "^23.0.1",
|
|
110
|
+
"vite-plugin-eslint2": "^5.1.0",
|
|
111
111
|
"vite-plugin-inspect": "^11.3.3",
|
|
112
|
-
"vite-plugin-stylelint": "^6.0
|
|
113
|
-
"vite-plugin-svgr": "^4.5.0"
|
|
114
|
-
"vite-tsconfig-paths": "^5.1.4"
|
|
112
|
+
"vite-plugin-stylelint": "^6.1.0",
|
|
113
|
+
"vite-plugin-svgr": "^4.5.0"
|
|
115
114
|
},
|
|
116
115
|
"devDependencies": {
|
|
117
|
-
"@commitlint/cli": "^20.
|
|
118
|
-
"@commitlint/types": "^20.
|
|
119
|
-
"@stylistic/stylelint-config": "^
|
|
116
|
+
"@commitlint/cli": "^20.5.0",
|
|
117
|
+
"@commitlint/types": "^20.5.0",
|
|
118
|
+
"@stylistic/stylelint-config": "^4.0.0",
|
|
120
119
|
"@types/html-minifier-terser": "^7.0.2",
|
|
121
120
|
"@types/prompts": "^2.4.9",
|
|
122
|
-
"eslint": "^
|
|
121
|
+
"eslint": "^10.1.0",
|
|
122
|
+
"eslint-plugin-jsdoc": "^62.8.0",
|
|
123
123
|
"husky": "^9.1.7",
|
|
124
|
-
"lint-staged": "^16.
|
|
125
|
-
"stylelint": "^
|
|
126
|
-
"stylelint-config-recess-order": "^7.
|
|
127
|
-
"stylelint-config-recommended": "^
|
|
128
|
-
"stylelint-config-standard-scss": "^
|
|
129
|
-
"stylelint-order": "^
|
|
124
|
+
"lint-staged": "^16.4.0",
|
|
125
|
+
"stylelint": "^17.5.0",
|
|
126
|
+
"stylelint-config-recess-order": "^7.7.0",
|
|
127
|
+
"stylelint-config-recommended": "^18.0.0",
|
|
128
|
+
"stylelint-config-standard-scss": "^17.0.0",
|
|
129
|
+
"stylelint-order": "^8.1.1",
|
|
130
130
|
"tsup": "^8.5.1",
|
|
131
|
-
"type-fest": "^5.
|
|
132
|
-
"vite": "^
|
|
131
|
+
"type-fest": "^5.5.0",
|
|
132
|
+
"vite": "^8.0.2"
|
|
133
133
|
},
|
|
134
134
|
"scripts": {
|
|
135
135
|
"clean": "rimraf dist",
|
package/tsconfig.base.json
CHANGED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { UserConfig } from '@commitlint/types';
|
|
2
|
-
/**
|
|
3
|
-
* Defines a commitlint configuration that extends the conventional commit format.
|
|
4
|
-
* This configuration ensures that commit messages follow the conventional commit specification.
|
|
5
|
-
*
|
|
6
|
-
* @returns A commitlint configuration object
|
|
7
|
-
*/
|
|
8
|
-
export declare function defineCommitlintConfig(): UserConfig;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Config } from 'stylelint';
|
|
2
|
-
/**
|
|
3
|
-
* Defines a stylelint configuration that extends the recommended configuration and uses the stylelint-order plugin.
|
|
4
|
-
*
|
|
5
|
-
* @returns The stylelint configuration object
|
|
6
|
-
*/
|
|
7
|
-
export declare function defineStylelintConfig(): Config;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { PluginOption, ProxyOptions, UserConfig, UserConfigExport } from 'vite';
|
|
2
|
-
import { AutoEnhancePlugin } from './plugin-auto-enhance';
|
|
3
|
-
import { ReactPluginOptions } from './plugin-react';
|
|
4
|
-
/**
|
|
5
|
-
* The options to define the vef config
|
|
6
|
-
*/
|
|
7
|
-
export interface DefineConfigOptions {
|
|
8
|
-
/**
|
|
9
|
-
* The resolve config
|
|
10
|
-
*/
|
|
11
|
-
resolve?: Pick<NonNullable<UserConfig["resolve"]>, "alias" | "conditions">;
|
|
12
|
-
/**
|
|
13
|
-
* The plugins to use
|
|
14
|
-
*/
|
|
15
|
-
plugins?: PluginOption[];
|
|
16
|
-
/**
|
|
17
|
-
* The auto enhance plugins to use
|
|
18
|
-
*/
|
|
19
|
-
autoEnhancePlugins?: AutoEnhancePlugin[];
|
|
20
|
-
/**
|
|
21
|
-
* The history mode to use for the router
|
|
22
|
-
*/
|
|
23
|
-
routerHistory?: "hash" | "browser";
|
|
24
|
-
/**
|
|
25
|
-
* The react plugin options
|
|
26
|
-
*/
|
|
27
|
-
react?: ReactPluginOptions;
|
|
28
|
-
/**
|
|
29
|
-
* The proxies of the dev server
|
|
30
|
-
*/
|
|
31
|
-
proxies?: Record<string, string | ProxyOptions>;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Define the vite config
|
|
35
|
-
*
|
|
36
|
-
* @param options - The options to define the vite config
|
|
37
|
-
* @returns The vite config
|
|
38
|
-
*/
|
|
39
|
-
export declare function defineViteConfig({ resolve, plugins, autoEnhancePlugins, routerHistory, react, proxies }?: DefineConfigOptions): UserConfigExport;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The version of the framework
|
|
3
|
-
*/
|
|
4
|
-
export declare const VEF_FRAMEWORK_VERSION = "1.0.0";
|
|
5
|
-
/**
|
|
6
|
-
* The directory of the public files
|
|
7
|
-
*/
|
|
8
|
-
export declare const PUBLIC_DIR = "public";
|
|
9
|
-
/**
|
|
10
|
-
* The directory of the environment files
|
|
11
|
-
*/
|
|
12
|
-
export declare const ENV_DIR = "env";
|
|
13
|
-
/**
|
|
14
|
-
* The directory of the assets
|
|
15
|
-
*/
|
|
16
|
-
export declare const ASSETS_DIR = "assets";
|
|
17
|
-
/**
|
|
18
|
-
* The prefix of the environment variables for the app
|
|
19
|
-
*/
|
|
20
|
-
export declare const ENV_APP_PREFIX = "VEF_APP_";
|
|
21
|
-
/**
|
|
22
|
-
* The prefix of the environment variables for the build tools
|
|
23
|
-
*/
|
|
24
|
-
export declare const ENV_BUILD_PREFIX = "VEF_BUILD_";
|
|
25
|
-
/**
|
|
26
|
-
* The directory of the source files
|
|
27
|
-
*/
|
|
28
|
-
export declare const SRC_DIR = "src";
|
|
29
|
-
/**
|
|
30
|
-
* The default output directory of the build
|
|
31
|
-
*/
|
|
32
|
-
export declare const DEFAULT_OUTPUT_DIR = "dist";
|
|
33
|
-
/**
|
|
34
|
-
* The default port of the dev server
|
|
35
|
-
*/
|
|
36
|
-
export declare const DEFAULT_SERVER_PORT = 3833;
|
|
37
|
-
/**
|
|
38
|
-
* The default name of the app
|
|
39
|
-
*/
|
|
40
|
-
export declare const DEFAULT_APP_NAME = "APP";
|
|
41
|
-
/**
|
|
42
|
-
* The directory of the pages
|
|
43
|
-
*/
|
|
44
|
-
export declare const PAGES_DIR = "pages";
|
|
45
|
-
/**
|
|
46
|
-
* The directory of the router
|
|
47
|
-
*/
|
|
48
|
-
export declare const ROUTER_DIR = "router";
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Define the constants
|
|
3
|
-
*
|
|
4
|
-
* @param appName - The name of the app
|
|
5
|
-
* @param appVersion - The version of the app
|
|
6
|
-
* @param isDev - Whether the app is in development mode
|
|
7
|
-
*/
|
|
8
|
-
export declare function defineConstants(appName: string | undefined, appVersion: string, isDev: boolean): {
|
|
9
|
-
__VEF_FRAMEWORK_VERSION__: string;
|
|
10
|
-
__VEF_APP_VERSION__: string;
|
|
11
|
-
__VEF_APP_CONFIG__: string;
|
|
12
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Plugin } from 'vite';
|
|
2
|
-
/**
|
|
3
|
-
* The options for the app config plugin
|
|
4
|
-
*/
|
|
5
|
-
export interface PluginAppConfigOptions {
|
|
6
|
-
/**
|
|
7
|
-
* The base public path
|
|
8
|
-
*/
|
|
9
|
-
basePublicPath?: string;
|
|
10
|
-
/**
|
|
11
|
-
* The output directory of the build
|
|
12
|
-
*/
|
|
13
|
-
outputDir?: string;
|
|
14
|
-
/**
|
|
15
|
-
* The name of the app
|
|
16
|
-
*/
|
|
17
|
-
appName?: string;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* The plugin for the app config
|
|
21
|
-
*
|
|
22
|
-
* @param options - The options of the plugin
|
|
23
|
-
* @param options.basePublicPath - The base public path
|
|
24
|
-
* @param options.outputDir - The output directory of the build
|
|
25
|
-
* @param options.appName - The name of the app
|
|
26
|
-
* @returns The plugin
|
|
27
|
-
*/
|
|
28
|
-
export declare function createAppConfigPlugin({ basePublicPath, outputDir, appName }: PluginAppConfigOptions): Plugin<any> | Plugin<any>[];
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Plugin } from 'vite';
|
|
2
|
-
import { AutoEnhanceOptions } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Create auto-enhance plugin
|
|
5
|
-
*
|
|
6
|
-
* This is a micro-kernel architecture generic AST transformation plugin that supports
|
|
7
|
-
* registering multiple sub-plugins to handle different code enhancement needs.
|
|
8
|
-
*
|
|
9
|
-
* @param options Plugin configuration options
|
|
10
|
-
* @returns Vite plugin
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```typescript
|
|
14
|
-
* import { createAutoEnhancePlugin } from "@vef-framework/dev";
|
|
15
|
-
* import { operationColumnWidthPlugin } from "@vef-framework/dev";
|
|
16
|
-
*
|
|
17
|
-
* export default defineConfig({
|
|
18
|
-
* plugins: [
|
|
19
|
-
* createAutoEnhancePlugin({
|
|
20
|
-
* plugins: [operationColumnWidthPlugin],
|
|
21
|
-
* verbose: true
|
|
22
|
-
* })
|
|
23
|
-
* ]
|
|
24
|
-
* });
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
27
|
-
export declare function createAutoEnhancePlugin({ plugins, ...options }?: AutoEnhanceOptions): Plugin;
|
|
28
|
-
export * from './plugins';
|
|
29
|
-
export type * from './types';
|
|
30
|
-
export { types } from 'recast';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { AutoEnhancePlugin } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Operation column width auto-calculation plugin
|
|
4
|
-
*
|
|
5
|
-
* Automatically calculates optimal width for operationColumn based on OperationButton components.
|
|
6
|
-
* Works with any component using: operationColumn={{ render: () => <OperationButton>...</OperationButton> }}
|
|
7
|
-
*
|
|
8
|
-
* Validation rules:
|
|
9
|
-
* 1. OperationButton must be imported from @vef-framework/components or @vef-framework/starter
|
|
10
|
-
* 2. operationColumn value must be an ObjectExpression with render property
|
|
11
|
-
* 3. render function must contain valid OperationButton components
|
|
12
|
-
* 4. width must not already be defined
|
|
13
|
-
*/
|
|
14
|
-
export declare const operationColumnWidthPlugin: AutoEnhancePlugin;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Plugin } from 'vite';
|
|
2
|
-
/**
|
|
3
|
-
* Create the router plugin
|
|
4
|
-
*
|
|
5
|
-
* @param projectDir - The project directory
|
|
6
|
-
* @param history - The history mode to use
|
|
7
|
-
* @returns The router plugin
|
|
8
|
-
*/
|
|
9
|
-
export declare function createRouterPlugin(projectDir: string, history?: "hash" | "browser"): Plugin<any> | Plugin<any>[];
|