@chenhui996/gg-cli 1.0.3 → 1.0.5

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 (76) hide show
  1. package/dist/template/operations-tem/.editorconfig +16 -0
  2. package/dist/template/operations-tem/.env.development +4 -0
  3. package/dist/template/operations-tem/.env.production +4 -0
  4. package/dist/template/operations-tem/.env.test +4 -0
  5. package/dist/template/operations-tem/.prettierignore +34 -0
  6. package/dist/template/operations-tem/.prettierrc +14 -0
  7. package/dist/template/operations-tem/README.md +54 -17
  8. package/dist/template/operations-tem/docs/Git/345/274/200/345/217/221/350/247/204/350/214/203.md +105 -0
  9. package/dist/template/operations-tem/docs/React/345/274/200/345/217/221/350/247/204/350/214/203.md +81 -0
  10. package/dist/template/operations-tem/docs/TypeScript/345/274/200/345/217/221/350/247/204/350/214/203.md +119 -0
  11. package/dist/template/operations-tem/docs//345/211/215/347/253/257/346/227/245/345/277/227/344/270/216/347/233/221/346/216/247/345/237/213/347/202/271/350/247/204/350/214/203.md +136 -0
  12. package/dist/template/operations-tem/docs//345/215/225/345/205/203/346/265/213/350/257/225/350/247/204/350/214/203.md +131 -0
  13. package/dist/template/operations-tem/docs//351/241/271/347/233/256/347/233/256/345/275/225/347/273/223/346/236/204/350/247/204/350/214/203.md +93 -0
  14. package/dist/template/operations-tem/package.json +20 -3
  15. package/dist/template/operations-tem/src/api/user.ts +2 -2
  16. package/dist/template/operations-tem/src/components/ErrorBoundary/index.tsx +82 -0
  17. package/dist/template/operations-tem/src/layouts/BasicLayout.tsx +39 -48
  18. package/dist/template/operations-tem/src/main.tsx +11 -11
  19. package/dist/template/operations-tem/src/pages/404.test.tsx +20 -0
  20. package/dist/template/operations-tem/src/pages/dashboard/index.tsx +1 -1
  21. package/dist/template/operations-tem/src/pages/home/index.tsx +61 -32
  22. package/dist/template/operations-tem/src/router/index.tsx +27 -21
  23. package/dist/template/operations-tem/src/setupTests.ts +1 -0
  24. package/dist/template/operations-tem/src/store/useCounterStore.ts +6 -6
  25. package/dist/template/operations-tem/src/style.less +3 -3
  26. package/dist/template/operations-tem/src/utils/request/index.ts +5 -5
  27. package/dist/template/operations-tem/src/vite-env.d.ts +12 -0
  28. package/dist/template/operations-tem/tsconfig.app.json +7 -1
  29. package/dist/template/operations-tem/vite.config.ts +61 -2
  30. package/dist/template/zhiguan/.editorconfig +16 -0
  31. package/dist/template/zhiguan/.env +1 -0
  32. package/dist/template/zhiguan/.env.development +4 -0
  33. package/dist/template/zhiguan/.env.production +4 -0
  34. package/dist/template/zhiguan/.env.test +4 -0
  35. package/dist/template/zhiguan/.prettierignore +34 -0
  36. package/dist/template/zhiguan/.prettierrc +14 -0
  37. package/dist/template/zhiguan/README.md +183 -0
  38. package/dist/template/zhiguan/docs/Git/345/274/200/345/217/221/350/247/204/350/214/203.md +105 -0
  39. package/dist/template/zhiguan/docs/React/345/274/200/345/217/221/350/247/204/350/214/203.md +81 -0
  40. package/dist/template/zhiguan/docs/TypeScript/345/274/200/345/217/221/350/247/204/350/214/203.md +119 -0
  41. package/dist/template/zhiguan/docs//345/211/215/347/253/257/346/227/245/345/277/227/344/270/216/347/233/221/346/216/247/345/237/213/347/202/271/350/247/204/350/214/203.md +136 -0
  42. package/dist/template/zhiguan/docs//345/215/225/345/205/203/346/265/213/350/257/225/350/247/204/350/214/203.md +131 -0
  43. package/dist/template/zhiguan/docs//351/241/271/347/233/256/347/233/256/345/275/225/347/273/223/346/236/204/350/247/204/350/214/203.md +93 -0
  44. package/dist/template/zhiguan/eslint.config.js +27 -0
  45. package/dist/template/zhiguan/index.html +13 -0
  46. package/dist/template/zhiguan/package.json +60 -0
  47. package/dist/template/zhiguan/public/favicon.svg +1 -0
  48. package/dist/template/zhiguan/public/icons.svg +24 -0
  49. package/dist/template/zhiguan/src/api/user.ts +21 -0
  50. package/dist/template/zhiguan/src/assets/Frame 20.png +0 -0
  51. package/dist/template/zhiguan/src/assets/react.svg +1 -0
  52. package/dist/template/zhiguan/src/components/Chart/index.tsx +22 -0
  53. package/dist/template/zhiguan/src/components/ErrorBoundary/index.tsx +82 -0
  54. package/dist/template/zhiguan/src/layouts/BasicLayout.tsx +174 -0
  55. package/dist/template/zhiguan/src/main.tsx +38 -0
  56. package/dist/template/zhiguan/src/pages/404.test.tsx +20 -0
  57. package/dist/template/zhiguan/src/pages/404.tsx +32 -0
  58. package/dist/template/zhiguan/src/pages/about/index.tsx +8 -0
  59. package/dist/template/zhiguan/src/pages/calendar/index.tsx +8 -0
  60. package/dist/template/zhiguan/src/pages/dashboard/index.tsx +72 -0
  61. package/dist/template/zhiguan/src/pages/home/index.less +59 -0
  62. package/dist/template/zhiguan/src/pages/home/index.tsx +217 -0
  63. package/dist/template/zhiguan/src/pages/settings/index.tsx +8 -0
  64. package/dist/template/zhiguan/src/pages/workspace/index.tsx +8 -0
  65. package/dist/template/zhiguan/src/router/index.tsx +81 -0
  66. package/dist/template/zhiguan/src/setupTests.ts +1 -0
  67. package/dist/template/zhiguan/src/store/useCounterStore.ts +24 -0
  68. package/dist/template/zhiguan/src/style.less +3 -0
  69. package/dist/template/zhiguan/src/utils/request/index.ts +108 -0
  70. package/dist/template/zhiguan/src/vite-env.d.ts +12 -0
  71. package/dist/template/zhiguan/tsconfig.app.json +34 -0
  72. package/dist/template/zhiguan/tsconfig.json +7 -0
  73. package/dist/template/zhiguan/tsconfig.node.json +26 -0
  74. package/dist/template/zhiguan/vite.config.ts +77 -0
  75. package/package.json +1 -1
  76. package/dist/template/operations-tem/package-lock.json +0 -4672
@@ -21,9 +21,7 @@ const { Title, Text } = Typography;
21
21
  */
22
22
  const WelcomeHeader = () => (
23
23
  <div className="welcome-header">
24
- <Title level={2}>
25
- 下午好,你有3件待办任务...
26
- </Title>
24
+ <Title level={2}>下午好,你有3件待办任务...</Title>
27
25
  </div>
28
26
  );
29
27
 
@@ -42,25 +40,14 @@ const SearchSection = () => (
42
40
  placeholder="输入您想查询的数据、指令或功能,例如:帮我分析一下NVDA的最新财报..."
43
41
  className="search-input"
44
42
  />
45
- <Button
46
- type="primary"
47
- shape="circle"
48
- icon={<ArrowUpOutlined />}
49
- className="search-btn"
50
- />
43
+ <Button type="primary" shape="circle" icon={<ArrowUpOutlined />} className="search-btn" />
51
44
  </div>
52
-
45
+
53
46
  {/* 快捷标签 */}
54
47
  <div className="search-tags">
55
- <Tag className="tag-item">
56
- 分析财报
57
- </Tag>
58
- <Tag className="tag-item">
59
- 查询头寸
60
- </Tag>
61
- <Tag className="tag-item">
62
- 压力测试
63
- </Tag>
48
+ <Tag className="tag-item">分析财报</Tag>
49
+ <Tag className="tag-item">查询头寸</Tag>
50
+ <Tag className="tag-item">压力测试</Tag>
64
51
  </div>
65
52
  </div>
66
53
  );
@@ -73,19 +60,52 @@ const SearchSection = () => (
73
60
  const QuickActions = () => {
74
61
  // 功能入口配置数据
75
62
  const actions = [
76
- { title: '工作空间', icon: <AppstoreOutlined style={{ fontSize: 24, color: '#4F46E5' }} />, color: '#EEF2FF' },
77
- { title: '规则配置', icon: <SettingOutlined style={{ fontSize: 24, color: '#0EA5E9' }} />, color: '#F0F9FF' },
78
- { title: '事后风控', icon: <SafetyCertificateOutlined style={{ fontSize: 24, color: '#F59E0B' }} />, color: '#FFFBEB' },
79
- { title: '交易审批', icon: <AuditOutlined style={{ fontSize: 24, color: '#10B981' }} />, color: '#ECFDF5' },
80
- { title: '证券池管理', icon: <WalletOutlined style={{ fontSize: 24, color: '#3B82F6' }} />, color: '#EFF6FF' },
81
- { title: '数据审批', icon: <DatabaseOutlined style={{ fontSize: 24, color: '#06B6D4' }} />, color: '#ECFEFF' },
63
+ {
64
+ title: '工作空间',
65
+ icon: <AppstoreOutlined style={{ fontSize: 24, color: '#4F46E5' }} />,
66
+ color: '#EEF2FF',
67
+ },
68
+ {
69
+ title: '规则配置',
70
+ icon: <SettingOutlined style={{ fontSize: 24, color: '#0EA5E9' }} />,
71
+ color: '#F0F9FF',
72
+ },
73
+ {
74
+ title: '事后风控',
75
+ icon: <SafetyCertificateOutlined style={{ fontSize: 24, color: '#F59E0B' }} />,
76
+ color: '#FFFBEB',
77
+ },
78
+ {
79
+ title: '交易审批',
80
+ icon: <AuditOutlined style={{ fontSize: 24, color: '#10B981' }} />,
81
+ color: '#ECFDF5',
82
+ },
83
+ {
84
+ title: '证券池管理',
85
+ icon: <WalletOutlined style={{ fontSize: 24, color: '#3B82F6' }} />,
86
+ color: '#EFF6FF',
87
+ },
88
+ {
89
+ title: '数据审批',
90
+ icon: <DatabaseOutlined style={{ fontSize: 24, color: '#06B6D4' }} />,
91
+ color: '#ECFEFF',
92
+ },
82
93
  ];
83
94
 
84
95
  return (
85
96
  <div style={{ maxWidth: 1000, margin: '0 auto 48px' }}>
86
- <div style={{ display: 'flex', justifyContent: 'space-between', marginBottom: 16, padding: '0 8px' }}>
97
+ <div
98
+ style={{
99
+ display: 'flex',
100
+ justifyContent: 'space-between',
101
+ marginBottom: 16,
102
+ padding: '0 8px',
103
+ }}
104
+ >
87
105
  <Text type="secondary">常用功能</Text>
88
- <Button type="link" size="small" style={{ color: '#999' }}>更多</Button>
106
+ <Button type="link" size="small" style={{ color: '#999' }}>
107
+ 更多
108
+ </Button>
89
109
  </div>
90
110
  <Row gutter={[16, 16]}>
91
111
  {actions.map((action) => (
@@ -139,7 +159,9 @@ const TaskList = () => {
139
159
 
140
160
  return (
141
161
  <div style={{ maxWidth: 1000, margin: '0 auto' }}>
142
- <Text type="secondary" style={{ marginBottom: 16, display: 'block', paddingLeft: 8 }}>待办任务</Text>
162
+ <Text type="secondary" style={{ marginBottom: 16, display: 'block', paddingLeft: 8 }}>
163
+ 待办任务
164
+ </Text>
143
165
  <List
144
166
  dataSource={tasks}
145
167
  renderItem={(item) => (
@@ -155,17 +177,24 @@ const TaskList = () => {
155
177
  }}
156
178
  >
157
179
  <div style={{ display: 'flex', alignItems: 'center', flex: 1 }}>
158
- <Text type="secondary" style={{ width: 60, marginRight: 16 }}>{item.time}</Text>
180
+ <Text type="secondary" style={{ width: 60, marginRight: 16 }}>
181
+ {item.time}
182
+ </Text>
159
183
  <Text style={{ fontSize: 15, fontWeight: 500 }}>{item.content}</Text>
160
184
  </div>
161
-
185
+
162
186
  <Space size={16}>
163
187
  {item.tag && (
164
- <Tag color={item.tagColor} style={{ borderRadius: 4, border: 'none', marginRight: 0 }}>
188
+ <Tag
189
+ color={item.tagColor}
190
+ style={{ borderRadius: 4, border: 'none', marginRight: 0 }}
191
+ >
165
192
  {item.tag}
166
193
  </Tag>
167
194
  )}
168
- <Button type="link" size="small">处理</Button>
195
+ <Button type="link" size="small">
196
+ 处理
197
+ </Button>
169
198
  </Space>
170
199
  </List.Item>
171
200
  )}
@@ -2,23 +2,31 @@
2
2
  * 路由配置 (React Router Data API)
3
3
  * 采用对象配置模式,便于管理和扩展
4
4
  */
5
- import { lazy, Suspense, type ComponentType, type LazyExoticComponent } from "react";
6
- import { createBrowserRouter } from "react-router-dom";
7
- import { Spin } from "antd";
8
- import BasicLayout from "../layouts/BasicLayout";
5
+ import { lazy, Suspense, type ComponentType, type LazyExoticComponent } from 'react';
6
+ import { createBrowserRouter } from 'react-router-dom';
7
+ import { Spin } from 'antd';
8
+ import BasicLayout from '@/layouts/BasicLayout';
9
9
 
10
10
  // 路由懒加载配置
11
- const Home = lazy(() => import("../pages/home"));
12
- const About = lazy(() => import("../pages/about"));
13
- const Dashboard = lazy(() => import("../pages/dashboard"));
14
- const Workspace = lazy(() => import("../pages/workspace"));
15
- const Calendar = lazy(() => import("../pages/calendar"));
16
- const Settings = lazy(() => import("../pages/settings"));
17
- const NotFound = lazy(() => import("../pages/404"));
11
+ const Home = lazy(() => import('@/pages/home'));
12
+ const About = lazy(() => import('@/pages/about'));
13
+ const Dashboard = lazy(() => import('@/pages/dashboard'));
14
+ const Workspace = lazy(() => import('@/pages/workspace'));
15
+ const Calendar = lazy(() => import('@/pages/calendar'));
16
+ const Settings = lazy(() => import('@/pages/settings'));
17
+ const NotFound = lazy(() => import('@/pages/404'));
18
18
 
19
19
  // 全局 Loading 组件
20
20
  const Loading = () => (
21
- <div style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', height: '100%', minHeight: 400 }}>
21
+ <div
22
+ style={{
23
+ display: 'flex',
24
+ justifyContent: 'center',
25
+ alignItems: 'center',
26
+ height: '100%',
27
+ minHeight: 400,
28
+ }}
29
+ >
22
30
  <Spin size="large" />
23
31
  </div>
24
32
  );
@@ -32,11 +40,9 @@ function withSuspense(Component: LazyExoticComponent<ComponentType<any>>) {
32
40
  );
33
41
  }
34
42
 
35
-
36
-
37
43
  export const router = createBrowserRouter([
38
44
  {
39
- path: "/",
45
+ path: '/',
40
46
  // 根布局:BasicLayout (包含侧边栏和 Header)
41
47
  element: <BasicLayout />,
42
48
  // 子路由:渲染在 BasicLayout 的 <Outlet /> 中
@@ -46,28 +52,28 @@ export const router = createBrowserRouter([
46
52
  element: withSuspense(Home),
47
53
  },
48
54
  {
49
- path: "dashboard",
55
+ path: 'dashboard',
50
56
  element: withSuspense(Dashboard),
51
57
  },
52
58
  {
53
- path: "about",
59
+ path: 'about',
54
60
  element: withSuspense(About),
55
61
  },
56
62
  {
57
- path: "workspace",
63
+ path: 'workspace',
58
64
  element: withSuspense(Workspace),
59
65
  },
60
66
  {
61
- path: "calendar",
67
+ path: 'calendar',
62
68
  element: withSuspense(Calendar),
63
69
  },
64
70
  {
65
- path: "settings",
71
+ path: 'settings',
66
72
  element: withSuspense(Settings),
67
73
  },
68
74
  // 404 页面配置
69
75
  {
70
- path: "*",
76
+ path: '*',
71
77
  element: withSuspense(NotFound),
72
78
  },
73
79
  ],
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
@@ -1,16 +1,16 @@
1
- import { create } from 'zustand'
1
+ import { create } from 'zustand';
2
2
 
3
3
  // 1. 定义状态接口
4
4
  interface CounterState {
5
- count: number
6
- increment: () => void
7
- decrement: () => void
5
+ count: number;
6
+ increment: () => void;
7
+ decrement: () => void;
8
8
  }
9
9
 
10
10
  /**
11
11
  * 全局计数器状态 (Zustand Store)
12
12
  * 这是一个简单的状态管理示例,演示如何使用 Zustand
13
- *
13
+ *
14
14
  * @example
15
15
  * // 在组件中使用
16
16
  * const { count, increment } = useCounterStore()
@@ -21,4 +21,4 @@ export const useCounterStore = create<CounterState>()((set) => ({
21
21
  // 修改状态的方法 (Action)
22
22
  increment: () => set((state) => ({ count: state.count + 1 })),
23
23
  decrement: () => set((state) => ({ count: state.count - 1 })),
24
- }))
24
+ }));
@@ -1,3 +1,3 @@
1
- *{
2
- box-sizing: border-box;
3
- }
1
+ * {
2
+ box-sizing: border-box;
3
+ }
@@ -7,7 +7,7 @@ import axios, { type AxiosRequestConfig, type AxiosResponse } from 'axios';
7
7
  // 定义通用的后端响应结构
8
8
  export interface BaseResponse<T = unknown> {
9
9
  code: number; // 业务状态码 (0/200: 成功, 其他: 失败)
10
- data: T; // 业务数据
10
+ data: T; // 业务数据
11
11
  message: string; // 提示信息
12
12
  }
13
13
 
@@ -27,7 +27,7 @@ function createRequest(config: AxiosRequestConfig) {
27
27
  },
28
28
  (error) => {
29
29
  return Promise.reject(error);
30
- }
30
+ },
31
31
  );
32
32
 
33
33
  // 响应拦截器
@@ -68,7 +68,7 @@ function createRequest(config: AxiosRequestConfig) {
68
68
  console.error('网络连接异常,请稍后再试!');
69
69
  }
70
70
  return Promise.reject(error);
71
- }
71
+ },
72
72
  );
73
73
 
74
74
  // 返回封装好的请求方法对象
@@ -95,7 +95,7 @@ function createRequest(config: AxiosRequestConfig) {
95
95
  },
96
96
  delete: <T = unknown>(url: string, config?: AxiosRequestConfig): Promise<T> => {
97
97
  return instance.delete(url, config);
98
- }
98
+ },
99
99
  };
100
100
  }
101
101
 
@@ -103,6 +103,6 @@ function createRequest(config: AxiosRequestConfig) {
103
103
  // 可以直接 import { request } from '@/utils/request' 使用
104
104
  export const request = createRequest({
105
105
  // 从环境变量 VITE_API_BASE_URL 获取基础地址,默认为 /api
106
- baseURL: import.meta.env.VITE_API_BASE_URL || '/api',
106
+ baseURL: import.meta.env.VITE_API_BASE_URL || '/api',
107
107
  timeout: 10000, // 超时时间 10s
108
108
  });
@@ -0,0 +1,12 @@
1
+ /// <reference types="vitest" />
2
+ /// <reference types="vite/client" />
3
+
4
+ interface ImportMetaEnv {
5
+ readonly VITE_ENV: string;
6
+ readonly VITE_API_BASE_URL: string;
7
+ readonly VITE_APP_TITLE: string;
8
+ }
9
+
10
+ interface ImportMeta {
11
+ readonly env: ImportMetaEnv;
12
+ }
@@ -5,7 +5,7 @@
5
5
  "useDefineForClassFields": true,
6
6
  "lib": ["ES2023", "DOM", "DOM.Iterable"],
7
7
  "module": "ESNext",
8
- "types": ["vite/client"],
8
+ "types": ["vite/client", "node"],
9
9
  "skipLibCheck": true,
10
10
 
11
11
  /* Bundler mode */
@@ -16,6 +16,12 @@
16
16
  "noEmit": true,
17
17
  "jsx": "react-jsx",
18
18
 
19
+ /* Path Aliases */
20
+ "baseUrl": ".",
21
+ "paths": {
22
+ "@/*": ["src/*"]
23
+ },
24
+
19
25
  /* Linting */
20
26
  "strict": true,
21
27
  "noUnusedLocals": true,
@@ -1,13 +1,61 @@
1
- import { defineConfig } from 'vite'
1
+ import { defineConfig } from 'vitest/config'
2
2
  import react, { reactCompilerPreset } from '@vitejs/plugin-react'
3
3
  import babel from '@rolldown/plugin-babel'
4
+ import path from 'path'
5
+ import { visualizer } from 'rollup-plugin-visualizer'
4
6
 
5
7
  // https://vite.dev/config/
6
8
  export default defineConfig({
7
9
  plugins: [
8
10
  react(),
9
- babel({ presets: [reactCompilerPreset()] })
11
+ babel({ presets: [reactCompilerPreset()] }),
12
+ process.env.ANALYZE === 'true' && visualizer({
13
+ open: true,
14
+ gzipSize: true,
15
+ brotliSize: true,
16
+ filename: 'dist/stats.html',
17
+ }),
10
18
  ],
19
+ resolve: {
20
+ alias: {
21
+ '@': path.resolve(__dirname, './src'),
22
+ },
23
+ },
24
+ // 生产环境打包配置
25
+ build: {
26
+ // 消除打包大小超过 500kb 警告
27
+ chunkSizeWarningLimit: 2000,
28
+ minify: 'terser',
29
+ terserOptions: {
30
+ compress: {
31
+ drop_console: process.env.NODE_ENV === 'production',
32
+ drop_debugger: process.env.NODE_ENV === 'production',
33
+ },
34
+ },
35
+ rollupOptions: {
36
+ output: {
37
+ // 静态资源分类打包
38
+ chunkFileNames: 'assets/js/[name]-[hash].js',
39
+ entryFileNames: 'assets/js/[name]-[hash].js',
40
+ assetFileNames: 'assets/[ext]/[name]-[hash].[ext]',
41
+ // 手动分包策略
42
+ manualChunks(id) {
43
+ // 1. 将 react 核心全家桶打包到一起
44
+ if (id.includes('node_modules/react') || id.includes('node_modules/react-dom') || id.includes('node_modules/react-router-dom')) {
45
+ return 'vendor-react';
46
+ }
47
+ // 2. 将 echarts 单独打包 (体积较大)
48
+ if (id.includes('node_modules/echarts') || id.includes('node_modules/zrender')) {
49
+ return 'vendor-echarts';
50
+ }
51
+ // 3. 将 antd 和图标单独打包
52
+ if (id.includes('node_modules/antd') || id.includes('node_modules/@ant-design')) {
53
+ return 'vendor-antd';
54
+ }
55
+ },
56
+ },
57
+ },
58
+ },
11
59
  css: {
12
60
  preprocessorOptions: {
13
61
  less: {
@@ -15,4 +63,15 @@ export default defineConfig({
15
63
  },
16
64
  },
17
65
  },
66
+ // Vitest 测试配置
67
+ test: {
68
+ environment: 'jsdom',
69
+ globals: true,
70
+ setupFiles: './src/setupTests.ts',
71
+ coverage: {
72
+ provider: 'v8',
73
+ reporter: ['text', 'json', 'html'],
74
+ exclude: ['node_modules/', 'src/setupTests.ts', 'dist/'],
75
+ },
76
+ },
18
77
  })
@@ -0,0 +1,16 @@
1
+ # EditorConfig is awesome: https://EditorConfig.org
2
+
3
+ # top-most EditorConfig file
4
+ root = true
5
+
6
+ # Unix-style newlines with a newline ending every file
7
+ [*]
8
+ end_of_line = lf
9
+ insert_final_newline = true
10
+ charset = utf-8
11
+ trim_trailing_whitespace = true
12
+ indent_style = space
13
+ indent_size = 2
14
+
15
+ [*.md]
16
+ trim_trailing_whitespace = false
@@ -0,0 +1 @@
1
+ VITE_API_BASE_URL=/api
@@ -0,0 +1,4 @@
1
+ # 开发环境配置
2
+ VITE_ENV=development
3
+ VITE_API_BASE_URL=/api
4
+ VITE_APP_TITLE=Operations Template (Dev)
@@ -0,0 +1,4 @@
1
+ # 生产环境配置
2
+ VITE_ENV=production
3
+ VITE_API_BASE_URL=https://api.example.com
4
+ VITE_APP_TITLE=Operations Template
@@ -0,0 +1,4 @@
1
+ # 测试环境配置
2
+ VITE_ENV=test
3
+ VITE_API_BASE_URL=https://test-api.example.com
4
+ VITE_APP_TITLE=Operations Template (Test)
@@ -0,0 +1,34 @@
1
+ # 忽略格式化的目录和文件
2
+ node_modules
3
+ dist
4
+ build
5
+ coverage
6
+
7
+ # 忽略特定类型的文件
8
+ *.png
9
+ *.jpg
10
+ *.jpeg
11
+ *.gif
12
+ *.svg
13
+ *.ico
14
+ *.eot
15
+ *.ttf
16
+ *.woff
17
+ *.woff2
18
+ *.mp4
19
+ *.webm
20
+ *.ogg
21
+ *.mp3
22
+ *.wav
23
+ *.flac
24
+ *.aac
25
+
26
+ # 忽略锁定文件
27
+ package-lock.json
28
+ yarn.lock
29
+ pnpm-lock.yaml
30
+
31
+ # 其他忽略
32
+ .DS_Store
33
+ .idea
34
+ .vscode
@@ -0,0 +1,14 @@
1
+ {
2
+ "printWidth": 100,
3
+ "tabWidth": 2,
4
+ "useTabs": false,
5
+ "semi": true,
6
+ "singleQuote": true,
7
+ "quoteProps": "as-needed",
8
+ "jsxSingleQuote": false,
9
+ "trailingComma": "all",
10
+ "bracketSpacing": true,
11
+ "bracketSameLine": false,
12
+ "arrowParens": "always",
13
+ "endOfLine": "lf"
14
+ }