@vef-framework/dev 1.0.135 → 2.0.2
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/README +15 -0
- package/dist/cjs/index.cjs +23 -0
- package/dist/cjs/lint/commitlint.cjs +14 -0
- package/dist/cjs/lint/eslint.cjs +981 -0
- package/dist/cjs/lint/index.cjs +14 -0
- package/dist/cjs/lint/stylelint.cjs +92 -0
- package/dist/cjs/vite/chunks.cjs +42 -0
- package/dist/cjs/vite/config.cjs +83 -0
- package/dist/cjs/vite/constants.cjs +30 -0
- package/dist/cjs/vite/define.cjs +26 -0
- package/dist/cjs/vite/index.cjs +11 -0
- package/dist/cjs/vite/plugin-app-config.cjs +38 -0
- package/dist/cjs/vite/plugin-auto-enhance/core.cjs +147 -0
- package/dist/cjs/vite/plugin-auto-enhance/index.cjs +40 -0
- package/dist/cjs/vite/plugin-auto-enhance/plugins/index.cjs +10 -0
- package/dist/cjs/vite/plugin-auto-enhance/plugins/operation-column-width.cjs +229 -0
- package/dist/cjs/vite/plugin-conventional-config.cjs +91 -0
- package/dist/cjs/vite/plugin-eslint.cjs +24 -0
- package/dist/cjs/vite/plugin-html.cjs +216 -0
- package/dist/cjs/vite/plugin-icons.cjs +22 -0
- package/dist/cjs/vite/plugin-injection.cjs +20 -0
- package/dist/cjs/vite/plugin-inspect.cjs +15 -0
- package/dist/cjs/vite/plugin-react.cjs +80 -0
- package/dist/cjs/vite/plugin-router.cjs +49 -0
- package/dist/cjs/vite/plugin-stylelint.cjs +24 -0
- package/dist/cjs/vite/plugin-svgr.cjs +59 -0
- package/dist/cjs/vite/plugin-tsconfig-paths.cjs +14 -0
- package/dist/cjs/vite/postcss.cjs +13 -0
- package/dist/es/index.js +8 -0
- package/dist/es/lint/commitlint.js +10 -0
- package/dist/es/lint/eslint.js +958 -0
- package/dist/es/lint/index.js +4 -0
- package/dist/es/lint/stylelint.js +88 -0
- package/dist/es/vite/chunks.js +38 -0
- package/dist/es/vite/config.js +79 -0
- package/dist/es/vite/constants.js +15 -0
- package/dist/es/vite/define.js +22 -0
- package/dist/es/vite/index.js +3 -0
- package/dist/es/vite/plugin-app-config.js +34 -0
- package/dist/es/vite/plugin-auto-enhance/core.js +143 -0
- package/dist/es/vite/plugin-auto-enhance/index.js +32 -0
- package/dist/es/vite/plugin-auto-enhance/plugins/index.js +2 -0
- package/dist/es/vite/plugin-auto-enhance/plugins/operation-column-width.js +225 -0
- package/dist/es/vite/plugin-conventional-config.js +87 -0
- package/dist/es/vite/plugin-eslint.js +20 -0
- package/dist/es/vite/plugin-html.js +212 -0
- package/dist/es/vite/plugin-icons.js +17 -0
- package/dist/es/vite/plugin-injection.js +16 -0
- package/dist/es/vite/plugin-inspect.js +11 -0
- package/dist/es/vite/plugin-react.js +76 -0
- package/dist/es/vite/plugin-router.js +45 -0
- package/dist/es/vite/plugin-stylelint.js +20 -0
- package/dist/es/vite/plugin-svgr.js +55 -0
- package/dist/es/vite/plugin-tsconfig-paths.js +10 -0
- package/dist/es/vite/postcss.js +9 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/lint/commitlint.d.ts +8 -0
- package/dist/types/lint/eslint.d.ts +2 -0
- package/dist/types/lint/index.d.ts +3 -0
- package/dist/types/lint/stylelint.d.ts +7 -0
- package/dist/types/vite/chunks.d.ts +10 -0
- package/dist/types/vite/config.d.ts +39 -0
- package/{types → dist/types/vite}/constants.d.ts +4 -0
- package/dist/types/vite/define.d.ts +12 -0
- package/dist/types/vite/index.d.ts +3 -0
- package/{types → dist/types/vite}/plugin-app-config.d.ts +2 -1
- package/dist/types/vite/plugin-auto-enhance/core.d.ts +35 -0
- package/dist/types/vite/plugin-auto-enhance/index.d.ts +30 -0
- package/dist/types/vite/plugin-auto-enhance/plugins/index.d.ts +1 -0
- package/dist/types/vite/plugin-auto-enhance/plugins/operation-column-width.d.ts +14 -0
- package/dist/types/vite/plugin-auto-enhance/types.d.ts +83 -0
- package/{types → dist/types/vite}/plugin-conventional-config.d.ts +2 -2
- package/dist/types/vite/plugin-eslint.d.ts +7 -0
- package/{types → dist/types/vite}/plugin-html.d.ts +1 -1
- package/dist/types/vite/plugin-icons.d.ts +8 -0
- package/{types → dist/types/vite}/plugin-injection.d.ts +1 -1
- package/{types → dist/types/vite}/plugin-inspect.d.ts +2 -1
- package/dist/types/vite/plugin-react.d.ts +25 -0
- package/{types → dist/types/vite}/plugin-router.d.ts +2 -2
- package/dist/types/vite/plugin-stylelint.d.ts +7 -0
- package/dist/types/vite/plugin-svgr.d.ts +7 -0
- package/{types → dist/types/vite}/plugin-tsconfig-paths.d.ts +2 -1
- package/dist/types/vite/postcss.d.ts +9 -0
- package/package.json +97 -74
- package/{tsconfig.app.json → tsconfig.base.json} +13 -9
- package/{client.d.ts → types.d.ts} +0 -6
- package/README.md +0 -25
- package/bin/hoist-patterns.js +0 -1
- package/bin/vef.js +0 -18
- package/cjs/cli.cjs +0 -5
- package/cjs/commitlint-config.cjs +0 -2
- package/cjs/config.cjs +0 -2
- package/cjs/constants.cjs +0 -2
- package/cjs/eslint-config.cjs +0 -2
- package/cjs/index.cjs +0 -2
- package/cjs/json/monaco.nls.json.cjs +0 -15920
- package/cjs/json/monaco.theme.github-light.json.cjs +0 -349
- package/cjs/modules.d.cjs +0 -2
- package/cjs/plugin-app-config.cjs +0 -2
- package/cjs/plugin-conventional-config.cjs +0 -12
- package/cjs/plugin-eslint.cjs +0 -2
- package/cjs/plugin-html.cjs +0 -17
- package/cjs/plugin-icons.cjs +0 -2
- package/cjs/plugin-initialization.cjs +0 -135
- package/cjs/plugin-injection.cjs +0 -3
- package/cjs/plugin-inspect.cjs +0 -2
- package/cjs/plugin-monaco-nls.cjs +0 -80
- package/cjs/plugin-react-swc.cjs +0 -2
- package/cjs/plugin-router.cjs +0 -11
- package/cjs/plugin-stylelint.cjs +0 -2
- package/cjs/plugin-svgr.cjs +0 -2
- package/cjs/plugin-tailwind.cjs +0 -2
- package/cjs/plugin-tailwindcss.cjs +0 -3
- package/cjs/plugin-tsconfig-paths.cjs +0 -2
- package/cjs/plugin-visualizer.cjs +0 -2
- package/cjs/plugin-webfont.cjs +0 -2
- package/cjs/stylelint-config.cjs +0 -2
- package/cjs/tailwind-config.cjs +0 -2
- package/cjs/types.cjs +0 -2
- package/esm/cli.js +0 -5
- package/esm/commitlint-config.js +0 -2
- package/esm/config.js +0 -2
- package/esm/constants.js +0 -2
- package/esm/eslint-config.js +0 -2
- package/esm/index.js +0 -2
- package/esm/json/monaco.nls.json.js +0 -15920
- package/esm/json/monaco.theme.github-light.json.js +0 -349
- package/esm/modules.d.js +0 -2
- package/esm/plugin-app-config.js +0 -2
- package/esm/plugin-conventional-config.js +0 -12
- package/esm/plugin-eslint.js +0 -2
- package/esm/plugin-html.js +0 -17
- package/esm/plugin-icons.js +0 -2
- package/esm/plugin-initialization.js +0 -135
- package/esm/plugin-injection.js +0 -3
- package/esm/plugin-inspect.js +0 -2
- package/esm/plugin-monaco-nls.js +0 -80
- package/esm/plugin-react-swc.js +0 -2
- package/esm/plugin-router.js +0 -11
- package/esm/plugin-stylelint.js +0 -2
- package/esm/plugin-svgr.js +0 -2
- package/esm/plugin-tailwind.js +0 -2
- package/esm/plugin-tailwindcss.js +0 -3
- package/esm/plugin-tsconfig-paths.js +0 -2
- package/esm/plugin-visualizer.js +0 -2
- package/esm/plugin-webfont.js +0 -2
- package/esm/stylelint-config.js +0 -2
- package/esm/tailwind-config.js +0 -2
- package/esm/types.js +0 -2
- package/template/.vscode/settings.json +0 -6
- package/template/_gitignore +0 -35
- package/template/_package.json +0 -43
- package/template/_tsconfig.json +0 -7
- package/template/commitlint.config.js +0 -3
- package/template/env/.env +0 -7
- package/template/env/.env.development +0 -0
- package/template/env/.env.production +0 -0
- package/template/env.d.ts +0 -1
- package/template/eslint.config.js +0 -3
- package/template/index.html +0 -0
- package/template/public/favicon.svg +0 -1
- package/template/src/main.ts +0 -145
- package/template/src/pages/__root.ts +0 -3
- package/template/src/pages/_common/access-denied.ts +0 -6
- package/template/src/pages/_common/login.ts +0 -8
- package/template/src/pages/_layout/index.tsx +0 -35
- package/template/src/pages/_layout/route.ts +0 -9
- package/template/src/pages/_layout/system/data-dictionary.tsx +0 -14
- package/template/src/pages/_layout/system/index.ts +0 -7
- package/template/src/pages/_layout/system/tenant.tsx +0 -14
- package/template/src/router/index.ts +0 -1
- package/template/style.css +0 -2
- package/template/stylelint.config.js +0 -3
- package/template/tailwind.config.js +0 -3
- package/template/tsconfig.app.json +0 -4
- package/template/tsconfig.build.json +0 -4
- package/template/vef.config.ts +0 -7
- package/tsconfig.build.json +0 -26
- package/types/cli.d.ts +0 -1
- package/types/commitlint-config.d.ts +0 -7
- package/types/config.d.ts +0 -38
- package/types/eslint-config.d.ts +0 -7
- package/types/index.d.ts +0 -5
- package/types/plugin-eslint.d.ts +0 -6
- package/types/plugin-icons.d.ts +0 -7
- package/types/plugin-initialization.d.ts +0 -7
- package/types/plugin-monaco-nls.d.ts +0 -15
- package/types/plugin-react-swc.d.ts +0 -6
- package/types/plugin-stylelint.d.ts +0 -6
- package/types/plugin-svgr.d.ts +0 -6
- package/types/plugin-tailwind.d.ts +0 -7
- package/types/plugin-tailwindcss.d.ts +0 -7
- package/types/plugin-visualizer.d.ts +0 -7
- package/types/plugin-webfont.d.ts +0 -6
- package/types/stylelint-config.d.ts +0 -7
- package/types/tailwind-config.d.ts +0 -7
- package/types/types.d.ts +0 -15
|
@@ -0,0 +1,12 @@
|
|
|
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,3 +1,4 @@
|
|
|
1
|
+
import { Plugin } from 'vite';
|
|
1
2
|
/**
|
|
2
3
|
* The options for the app config plugin
|
|
3
4
|
*/
|
|
@@ -24,4 +25,4 @@ export interface PluginAppConfigOptions {
|
|
|
24
25
|
* @param options.appName - The name of the app
|
|
25
26
|
* @returns The plugin
|
|
26
27
|
*/
|
|
27
|
-
export declare function createAppConfigPlugin({ basePublicPath, outputDir, appName
|
|
28
|
+
export declare function createAppConfigPlugin({ basePublicPath, outputDir, appName }: PluginAppConfigOptions): Plugin<any> | Plugin<any>[];
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Except } from 'type-fest';
|
|
2
|
+
import { TransformResult } from 'vite';
|
|
3
|
+
import { AutoEnhanceOptions, AutoEnhancePlugin } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* Auto-enhance core engine
|
|
6
|
+
*/
|
|
7
|
+
export declare class AutoEnhanceCore {
|
|
8
|
+
private plugins;
|
|
9
|
+
private options;
|
|
10
|
+
constructor(options?: Except<AutoEnhanceOptions, "plugins">);
|
|
11
|
+
/**
|
|
12
|
+
* Register a sub-plugin
|
|
13
|
+
*/
|
|
14
|
+
registerPlugin(plugin: AutoEnhancePlugin): void;
|
|
15
|
+
/**
|
|
16
|
+
* Register multiple sub-plugins
|
|
17
|
+
*/
|
|
18
|
+
registerPlugins(plugins: AutoEnhancePlugin[]): void;
|
|
19
|
+
/**
|
|
20
|
+
* Check if file should be processed
|
|
21
|
+
*/
|
|
22
|
+
private shouldProcessFile;
|
|
23
|
+
/**
|
|
24
|
+
* Create processing context
|
|
25
|
+
*/
|
|
26
|
+
private createTransformationContext;
|
|
27
|
+
/**
|
|
28
|
+
* Execute transformation
|
|
29
|
+
*/
|
|
30
|
+
transform(code: string, id: string): TransformResult | null;
|
|
31
|
+
/**
|
|
32
|
+
* Get registered plugin information
|
|
33
|
+
*/
|
|
34
|
+
getRegisteredPlugins(): Array<Pick<AutoEnhancePlugin, "name" | "description">>;
|
|
35
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
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';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { operationColumnWidthPlugin } from './operation-column-width';
|
|
@@ -0,0 +1,14 @@
|
|
|
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;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { types } from 'recast';
|
|
2
|
+
/**
|
|
3
|
+
* Context information for auto-enhance plugins
|
|
4
|
+
*/
|
|
5
|
+
export interface AutoEnhanceContext {
|
|
6
|
+
/**
|
|
7
|
+
* File ID
|
|
8
|
+
*/
|
|
9
|
+
id: string;
|
|
10
|
+
/**
|
|
11
|
+
* File name (last few levels of relative path)
|
|
12
|
+
*/
|
|
13
|
+
fileName: string;
|
|
14
|
+
/**
|
|
15
|
+
* Original source code
|
|
16
|
+
*/
|
|
17
|
+
code: string;
|
|
18
|
+
/**
|
|
19
|
+
* AST root node
|
|
20
|
+
*/
|
|
21
|
+
ast: types.ASTNode;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Transform result from auto-enhance plugins
|
|
25
|
+
*/
|
|
26
|
+
export interface TransformResult {
|
|
27
|
+
/**
|
|
28
|
+
* Whether changes were made
|
|
29
|
+
*/
|
|
30
|
+
hasChanges: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Log messages
|
|
33
|
+
*/
|
|
34
|
+
logs?: string[];
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Auto-enhance sub-plugin interface
|
|
38
|
+
*/
|
|
39
|
+
export interface AutoEnhancePlugin {
|
|
40
|
+
/**
|
|
41
|
+
* Plugin name
|
|
42
|
+
*/
|
|
43
|
+
name: string;
|
|
44
|
+
/**
|
|
45
|
+
* Plugin description
|
|
46
|
+
*/
|
|
47
|
+
description?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Whether this file should be processed
|
|
50
|
+
*
|
|
51
|
+
* @param context Context information
|
|
52
|
+
* @returns Whether to process
|
|
53
|
+
*/
|
|
54
|
+
shouldProcess?: (context: AutoEnhanceContext) => boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Execute transformation
|
|
57
|
+
*
|
|
58
|
+
* @param context Context information
|
|
59
|
+
* @returns Transform result
|
|
60
|
+
*/
|
|
61
|
+
transform: (context: AutoEnhanceContext) => TransformResult;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Auto-enhance plugin configuration
|
|
65
|
+
*/
|
|
66
|
+
export interface AutoEnhanceOptions {
|
|
67
|
+
/**
|
|
68
|
+
* List of enabled sub-plugins
|
|
69
|
+
*/
|
|
70
|
+
plugins?: AutoEnhancePlugin[];
|
|
71
|
+
/**
|
|
72
|
+
* File filter, only process matching files
|
|
73
|
+
*/
|
|
74
|
+
include?: string | RegExp | Array<string | RegExp>;
|
|
75
|
+
/**
|
|
76
|
+
* File excluder, skip matching files
|
|
77
|
+
*/
|
|
78
|
+
exclude?: string | RegExp | Array<string | RegExp>;
|
|
79
|
+
/**
|
|
80
|
+
* Custom log prefix
|
|
81
|
+
*/
|
|
82
|
+
logPrefix?: string;
|
|
83
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Plugin, ProxyOptions } from 'vite';
|
|
2
2
|
/**
|
|
3
3
|
* The options of the vite plugin for the conventional config
|
|
4
4
|
*/
|
|
@@ -45,4 +45,4 @@ export interface PluginConventionalConfigOptions {
|
|
|
45
45
|
* @param options.proxies - The proxies of the server
|
|
46
46
|
* @returns The plugin
|
|
47
47
|
*/
|
|
48
|
-
export declare function createConventionalConfigPlugin({ appName, appVersion, basePublicPath, projectDir, outputDir, serverPort, proxies
|
|
48
|
+
export declare function createConventionalConfigPlugin({ appName, appVersion, basePublicPath, projectDir, outputDir, serverPort, proxies }: PluginConventionalConfigOptions): Plugin;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { Plugin } from 'vite';
|
|
1
2
|
/**
|
|
2
3
|
* Create the inspect plugin for inspecting the plugin modules
|
|
3
4
|
*
|
|
4
5
|
* @returns The inspect plugin
|
|
5
6
|
*/
|
|
6
|
-
export declare function createInspectPlugin():
|
|
7
|
+
export declare function createInspectPlugin(): Plugin<any>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Options } from '@vitejs/plugin-react';
|
|
2
|
+
import { Plugin } from 'vite';
|
|
3
|
+
/**
|
|
4
|
+
* The react plugin options
|
|
5
|
+
*/
|
|
6
|
+
export interface ReactPluginOptions {
|
|
7
|
+
/**
|
|
8
|
+
* Whether to use emotion
|
|
9
|
+
*/
|
|
10
|
+
useEmotion?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Whether to use the react compiler
|
|
13
|
+
*/
|
|
14
|
+
useCompiler?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* The babel plugins to use
|
|
17
|
+
*/
|
|
18
|
+
babelPlugins?: NonNullable<Exclude<Options["babel"], (...args: any[]) => any>>["plugins"];
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The plugin to use react
|
|
22
|
+
*
|
|
23
|
+
* @returns The react plugin
|
|
24
|
+
*/
|
|
25
|
+
export declare function createReactPlugin({ useEmotion, useCompiler, babelPlugins }?: ReactPluginOptions): Plugin<any>[];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { Plugin } from 'vite';
|
|
1
2
|
/**
|
|
2
3
|
* Create the router plugin
|
|
3
4
|
*
|
|
4
5
|
* @param projectDir - The project directory
|
|
5
6
|
* @param history - The history mode to use
|
|
6
|
-
* @param autoCodeSplitting - Whether to enable auto code splitting
|
|
7
7
|
* @returns The router plugin
|
|
8
8
|
*/
|
|
9
|
-
export declare function createRouterPlugin(projectDir: string, history
|
|
9
|
+
export declare function createRouterPlugin(projectDir: string, history?: "hash" | "browser"): Plugin<any> | Plugin<any>[];
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { Plugin } from 'vite';
|
|
1
2
|
/**
|
|
2
3
|
* Create a tsconfig paths plugin
|
|
3
4
|
*
|
|
4
5
|
* @param projectDir - The project directory
|
|
5
6
|
* @returns The tsconfig paths plugin
|
|
6
7
|
*/
|
|
7
|
-
export declare function createTsconfigPathsPlugin(projectDir: string):
|
|
8
|
+
export declare function createTsconfigPathsPlugin(projectDir: string): Plugin<any>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { UserConfig } from 'vite';
|
|
2
|
+
type PostcssConfig = Exclude<NonNullable<UserConfig["css"]>["postcss"], string | undefined>;
|
|
3
|
+
/**
|
|
4
|
+
* Create the postcss config
|
|
5
|
+
*
|
|
6
|
+
* @returns The postcss config
|
|
7
|
+
*/
|
|
8
|
+
export declare function createPostcssConfig(): PostcssConfig;
|
|
9
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,103 +1,126 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vef-framework/dev",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.2",
|
|
5
5
|
"private": false,
|
|
6
|
-
"description": "
|
|
7
|
-
"author":
|
|
6
|
+
"description": "Dev tools for VEF framework",
|
|
7
|
+
"author": {
|
|
8
|
+
"name": "Venus",
|
|
9
|
+
"email": "iweixiaopeng@163.com",
|
|
10
|
+
"url": "https://github.com/ilxqx"
|
|
11
|
+
},
|
|
12
|
+
"license": "Apache-2.0",
|
|
13
|
+
"homepage": "https://vef.ilxqx.com",
|
|
8
14
|
"keywords": [
|
|
9
15
|
"vef",
|
|
10
|
-
"
|
|
11
|
-
"
|
|
16
|
+
"framework",
|
|
17
|
+
"react",
|
|
18
|
+
"dev"
|
|
12
19
|
],
|
|
13
20
|
"sideEffects": false,
|
|
14
21
|
"exports": {
|
|
15
|
-
"./client": {
|
|
16
|
-
"types": "./client.d.ts"
|
|
17
|
-
},
|
|
18
|
-
"./tsconfig.app.json": "./tsconfig.app.json",
|
|
19
|
-
"./tsconfig.build.json": "./tsconfig.build.json",
|
|
20
22
|
".": {
|
|
23
|
+
"source": "./src/index.ts",
|
|
21
24
|
"import": {
|
|
22
|
-
"types": "./types/index.d.ts",
|
|
23
|
-
"default": "./
|
|
25
|
+
"types": "./dist/types/index.d.ts",
|
|
26
|
+
"default": "./dist/es/index.js"
|
|
24
27
|
},
|
|
25
28
|
"require": {
|
|
26
|
-
"types": "./types/index.d.ts",
|
|
27
|
-
"default": "./cjs/index.cjs"
|
|
29
|
+
"types": "./dist/types/index.d.ts",
|
|
30
|
+
"default": "./dist/cjs/index.cjs"
|
|
28
31
|
}
|
|
29
32
|
},
|
|
33
|
+
"./types": {
|
|
34
|
+
"types": "./types.d.ts"
|
|
35
|
+
},
|
|
36
|
+
"./tsconfig.json": "./tsconfig.base.json",
|
|
30
37
|
"./package.json": "./package.json"
|
|
31
38
|
},
|
|
32
|
-
"main": "cjs/index.cjs",
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"vef": "bin/vef.js"
|
|
36
|
-
},
|
|
39
|
+
"main": "dist/cjs/index.cjs",
|
|
40
|
+
"module": "dist/es/index.js",
|
|
41
|
+
"types": "dist/types/index.d.ts",
|
|
37
42
|
"files": [
|
|
38
|
-
"
|
|
43
|
+
"dist",
|
|
44
|
+
"tsconfig.base.json",
|
|
45
|
+
"types.d.ts"
|
|
39
46
|
],
|
|
40
47
|
"engines": {
|
|
41
|
-
"node": ">=
|
|
48
|
+
"node": ">=22.x"
|
|
49
|
+
},
|
|
50
|
+
"publishConfig": {
|
|
51
|
+
"access": "public"
|
|
52
|
+
},
|
|
53
|
+
"peerDependencies": {
|
|
54
|
+
"@commitlint/cli": "^20.1.0",
|
|
55
|
+
"eslint": "^9.37.0",
|
|
56
|
+
"lint-staged": "^16.2.3",
|
|
57
|
+
"stylelint": "^16.25.0",
|
|
58
|
+
"stylelint-config-recess-order": "^7.4.0",
|
|
59
|
+
"stylelint-config-recommended": "^17.0.0",
|
|
60
|
+
"stylelint-config-standard-scss": "^16.0.0",
|
|
61
|
+
"stylelint-order": "^7.0.0",
|
|
62
|
+
"vite": "^7.1.9"
|
|
42
63
|
},
|
|
43
64
|
"dependencies": {
|
|
44
|
-
"@
|
|
45
|
-
"@
|
|
46
|
-
"@
|
|
47
|
-
"@commitlint/
|
|
48
|
-
"@
|
|
49
|
-
"@eslint-
|
|
50
|
-
"@
|
|
51
|
-
"@
|
|
52
|
-
"@
|
|
53
|
-
"@iconify-json/tabler": "^1.2.17",
|
|
65
|
+
"@babel/core": "^7.28.5",
|
|
66
|
+
"@babel/parser": "^7.28.5",
|
|
67
|
+
"@babel/traverse": "^7.28.5",
|
|
68
|
+
"@commitlint/config-conventional": "^20.0.0",
|
|
69
|
+
"@emotion/babel-plugin": "^11.13.5",
|
|
70
|
+
"@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
|
|
71
|
+
"@eslint-react/eslint-plugin": "^2.3.7",
|
|
72
|
+
"@eslint/js": "^9.39.1",
|
|
73
|
+
"@stylistic/eslint-plugin": "^5.6.1",
|
|
54
74
|
"@svgr/plugin-svgo": "^8.1.0",
|
|
55
|
-
"@
|
|
56
|
-
"@
|
|
57
|
-
"@tanstack/
|
|
58
|
-
"@
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"chalk": "^5.4.1",
|
|
62
|
-
"commander": "^13.1.0",
|
|
75
|
+
"@tanstack/eslint-plugin-query": "^5.91.2",
|
|
76
|
+
"@tanstack/eslint-plugin-router": "^1.139.0",
|
|
77
|
+
"@tanstack/router-plugin": "^1.139.3",
|
|
78
|
+
"@vitejs/plugin-react": "^5.1.1",
|
|
79
|
+
"babel-plugin-react-compiler": "1.0.0",
|
|
80
|
+
"chalk": "^5.6.2",
|
|
63
81
|
"consola": "^3.4.2",
|
|
64
|
-
"dotenv": "^
|
|
65
|
-
"eslint": "
|
|
66
|
-
"eslint-plugin-
|
|
67
|
-
"eslint-plugin-
|
|
68
|
-
"eslint-plugin-
|
|
69
|
-
"eslint-plugin-
|
|
70
|
-
"
|
|
71
|
-
"
|
|
82
|
+
"dotenv": "^17.2.3",
|
|
83
|
+
"eslint-config-flat-gitignore": "^2.1.0",
|
|
84
|
+
"eslint-plugin-antfu": "^3.1.1",
|
|
85
|
+
"eslint-plugin-format": "^1.0.2",
|
|
86
|
+
"eslint-plugin-import-lite": "^0.3.0",
|
|
87
|
+
"eslint-plugin-perfectionist": "^4.15.1",
|
|
88
|
+
"eslint-plugin-react-hooks": "7.0.1",
|
|
89
|
+
"eslint-plugin-react-refresh": "^0.4.24",
|
|
90
|
+
"eslint-plugin-regexp": "^2.10.0",
|
|
91
|
+
"eslint-plugin-unicorn": "^62.0.0",
|
|
92
|
+
"eslint-plugin-unused-imports": "^4.3.0",
|
|
93
|
+
"fs-extra": "^11.3.2",
|
|
72
94
|
"html-minifier-terser": "^7.2.0",
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"prompts": "^2.4.2",
|
|
78
|
-
"radashi": "12.4.0",
|
|
79
|
-
"rollup-plugin-visualizer": "^5.14.0",
|
|
80
|
-
"sass-embedded": "^1.86.3",
|
|
81
|
-
"stylelint": "^16.18.0",
|
|
82
|
-
"stylelint-config-recess-order": "^6.0.0",
|
|
83
|
-
"stylelint-config-recommended": "^16.0.0",
|
|
84
|
-
"stylelint-config-standard-scss": "^14.0.0",
|
|
85
|
-
"stylelint-order": "^6.0.4",
|
|
86
|
-
"tailwindcss": "^4.1.4",
|
|
87
|
-
"tslib": "2.8.1",
|
|
95
|
+
"radashi": "^12.7.1",
|
|
96
|
+
"recast": "^0.23.11",
|
|
97
|
+
"sass-embedded": "^1.93.3",
|
|
98
|
+
"typescript-eslint": "^8.47.0",
|
|
88
99
|
"unplugin-config": "^0.1.5",
|
|
89
|
-
"unplugin-icons": "^22.
|
|
90
|
-
"vite": "
|
|
91
|
-
"vite-plugin-
|
|
92
|
-
"vite-plugin-
|
|
93
|
-
"vite-plugin-
|
|
94
|
-
"vite-plugin-svgr": "^4.3.0",
|
|
95
|
-
"vite-plugin-webfont-dl": "^3.10.4",
|
|
100
|
+
"unplugin-icons": "^22.5.0",
|
|
101
|
+
"vite-plugin-eslint2": "^5.0.4",
|
|
102
|
+
"vite-plugin-inspect": "^11.3.3",
|
|
103
|
+
"vite-plugin-stylelint": "^6.0.2",
|
|
104
|
+
"vite-plugin-svgr": "^4.5.0",
|
|
96
105
|
"vite-tsconfig-paths": "^5.1.4"
|
|
97
106
|
},
|
|
98
|
-
"
|
|
99
|
-
"
|
|
107
|
+
"devDependencies": {
|
|
108
|
+
"@commitlint/cli": "^20.1.0",
|
|
109
|
+
"@commitlint/types": "^20.0.0",
|
|
110
|
+
"@types/html-minifier-terser": "^7.0.2",
|
|
111
|
+
"eslint": "^9.39.1",
|
|
112
|
+
"lint-staged": "^16.2.7",
|
|
113
|
+
"stylelint": "^16.26.0",
|
|
114
|
+
"stylelint-config-recess-order": "^7.4.0",
|
|
115
|
+
"stylelint-config-recommended": "^17.0.0",
|
|
116
|
+
"stylelint-config-standard-scss": "^16.0.0",
|
|
117
|
+
"stylelint-order": "^7.0.0",
|
|
118
|
+
"type-fest": "^5.2.0",
|
|
119
|
+
"vite": "^7.2.4"
|
|
100
120
|
},
|
|
101
|
-
"
|
|
102
|
-
|
|
103
|
-
|
|
121
|
+
"scripts": {
|
|
122
|
+
"clean": "rimraf dist",
|
|
123
|
+
"typecheck": "tsc --noEmit",
|
|
124
|
+
"build": "vite build"
|
|
125
|
+
}
|
|
126
|
+
}
|
|
@@ -1,28 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"jsx": "react-jsx",
|
|
6
|
-
"lib": ["ESNext", "DOM", "DOM.Iterable"],
|
|
3
|
+
"target": "esnext",
|
|
4
|
+
"lib": ["ESNext"],
|
|
7
5
|
"moduleDetection": "force",
|
|
8
6
|
"useDefineForClassFields": true,
|
|
9
|
-
"module": "
|
|
7
|
+
"module": "esnext",
|
|
10
8
|
"moduleResolution": "bundler",
|
|
9
|
+
"resolveJsonModule": true,
|
|
11
10
|
"allowImportingTsExtensions": false,
|
|
12
|
-
"allowJs": true,
|
|
13
|
-
|
|
14
|
-
/* Linting */
|
|
15
11
|
"strict": true,
|
|
12
|
+
"allowUnreachableCode": false,
|
|
13
|
+
"allowUnusedLabels": false,
|
|
16
14
|
"noFallthroughCasesInSwitch": true,
|
|
17
15
|
"noImplicitAny": true,
|
|
18
16
|
"noImplicitOverride": true,
|
|
17
|
+
"noImplicitReturns": false,
|
|
18
|
+
"noImplicitThis": true,
|
|
19
|
+
"noUncheckedIndexedAccess": true,
|
|
19
20
|
"noUnusedLocals": true,
|
|
20
21
|
"noUnusedParameters": true,
|
|
22
|
+
"noErrorTruncation": true,
|
|
21
23
|
"noEmit": true,
|
|
22
24
|
"allowSyntheticDefaultImports": true,
|
|
23
|
-
"esModuleInterop":
|
|
25
|
+
"esModuleInterop": false,
|
|
26
|
+
"forceConsistentCasingInFileNames": true,
|
|
24
27
|
"isolatedModules": true,
|
|
25
28
|
"verbatimModuleSyntax": true,
|
|
29
|
+
"erasableSyntaxOnly": true,
|
|
26
30
|
"skipLibCheck": true,
|
|
27
31
|
"noUncheckedSideEffectImports": true
|
|
28
32
|
}
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
/// <reference types="vite/client" />
|
|
2
|
-
|
|
3
2
|
/// <reference types="vite-plugin-svgr/client" />
|
|
4
|
-
|
|
5
3
|
/// <reference types="unplugin-icons/types/react" />
|
|
6
4
|
|
|
7
|
-
declare module "vef:initialization" {
|
|
8
|
-
export function initializeIntellisenseCodeEditor(): void;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
5
|
/**
|
|
12
6
|
* The version of the vef framework
|
|
13
7
|
*/
|
package/README.md
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# The Development tools of VEF Framework
|
|
2
|
-
|
|
3
|
-
VEF framework made by Venus is built on top of React, and it provides a set of components that are essential for building a modern web application. These components are designed to be highly customizable and reusable, allowing developers to build complex and dynamic user interfaces with ease.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
To install the VEF framework dev, you can use pnpm or any other package manager you like:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
pnpm add @vef-framework/dev
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Usage
|
|
14
|
-
|
|
15
|
-
To use the VEF framework dev in your project, you can import them from the package, for example:
|
|
16
|
-
|
|
17
|
-
```ts
|
|
18
|
-
import { xxx } from "@vef-framework/dev";
|
|
19
|
-
|
|
20
|
-
const result = xxx();
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Documentation
|
|
24
|
-
|
|
25
|
-
For more details on how to use the VEF framework dev, please refer to the [official documentation](https://vef.ilxqx.com/docs).
|
package/bin/hoist-patterns.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default ["recharts","@monaco-editor/react","@monaco-editor/loader","monaco-editor","eslint*","@eslint/*","@eslint-react/*","stylelint*","lint-staged","@commitlint/*","tailwindcss","@tailwindcss/vite","zod"]
|
package/bin/vef.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import module from "node:module";
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Start VEF CLI
|
|
7
|
-
*
|
|
8
|
-
* @returns The entry module of VEF CLI
|
|
9
|
-
*/
|
|
10
|
-
function start() {
|
|
11
|
-
try {
|
|
12
|
-
module.enableCompileCache();
|
|
13
|
-
} catch {}
|
|
14
|
-
|
|
15
|
-
return import("../esm/cli.js");
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
start();
|