@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.
- package/dist/template/operations-tem/.editorconfig +16 -0
- package/dist/template/operations-tem/.env.development +4 -0
- package/dist/template/operations-tem/.env.production +4 -0
- package/dist/template/operations-tem/.env.test +4 -0
- package/dist/template/operations-tem/.prettierignore +34 -0
- package/dist/template/operations-tem/.prettierrc +14 -0
- package/dist/template/operations-tem/README.md +54 -17
- package/dist/template/operations-tem/docs/Git/345/274/200/345/217/221/350/247/204/350/214/203.md +105 -0
- package/dist/template/operations-tem/docs/React/345/274/200/345/217/221/350/247/204/350/214/203.md +81 -0
- package/dist/template/operations-tem/docs/TypeScript/345/274/200/345/217/221/350/247/204/350/214/203.md +119 -0
- 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
- 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
- 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
- package/dist/template/operations-tem/package.json +20 -3
- package/dist/template/operations-tem/src/api/user.ts +2 -2
- package/dist/template/operations-tem/src/components/ErrorBoundary/index.tsx +82 -0
- package/dist/template/operations-tem/src/layouts/BasicLayout.tsx +39 -48
- package/dist/template/operations-tem/src/main.tsx +11 -11
- package/dist/template/operations-tem/src/pages/404.test.tsx +20 -0
- package/dist/template/operations-tem/src/pages/dashboard/index.tsx +1 -1
- package/dist/template/operations-tem/src/pages/home/index.tsx +61 -32
- package/dist/template/operations-tem/src/router/index.tsx +27 -21
- package/dist/template/operations-tem/src/setupTests.ts +1 -0
- package/dist/template/operations-tem/src/store/useCounterStore.ts +6 -6
- package/dist/template/operations-tem/src/style.less +3 -3
- package/dist/template/operations-tem/src/utils/request/index.ts +5 -5
- package/dist/template/operations-tem/src/vite-env.d.ts +12 -0
- package/dist/template/operations-tem/tsconfig.app.json +7 -1
- package/dist/template/operations-tem/vite.config.ts +61 -2
- package/dist/template/zhiguan/.editorconfig +16 -0
- package/dist/template/zhiguan/.env +1 -0
- package/dist/template/zhiguan/.env.development +4 -0
- package/dist/template/zhiguan/.env.production +4 -0
- package/dist/template/zhiguan/.env.test +4 -0
- package/dist/template/zhiguan/.prettierignore +34 -0
- package/dist/template/zhiguan/.prettierrc +14 -0
- package/dist/template/zhiguan/README.md +183 -0
- package/dist/template/zhiguan/docs/Git/345/274/200/345/217/221/350/247/204/350/214/203.md +105 -0
- package/dist/template/zhiguan/docs/React/345/274/200/345/217/221/350/247/204/350/214/203.md +81 -0
- package/dist/template/zhiguan/docs/TypeScript/345/274/200/345/217/221/350/247/204/350/214/203.md +119 -0
- 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
- 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
- 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
- package/dist/template/zhiguan/eslint.config.js +27 -0
- package/dist/template/zhiguan/index.html +13 -0
- package/dist/template/zhiguan/package.json +60 -0
- package/dist/template/zhiguan/public/favicon.svg +1 -0
- package/dist/template/zhiguan/public/icons.svg +24 -0
- package/dist/template/zhiguan/src/api/user.ts +21 -0
- package/dist/template/zhiguan/src/assets/Frame 20.png +0 -0
- package/dist/template/zhiguan/src/assets/react.svg +1 -0
- package/dist/template/zhiguan/src/components/Chart/index.tsx +22 -0
- package/dist/template/zhiguan/src/components/ErrorBoundary/index.tsx +82 -0
- package/dist/template/zhiguan/src/layouts/BasicLayout.tsx +174 -0
- package/dist/template/zhiguan/src/main.tsx +38 -0
- package/dist/template/zhiguan/src/pages/404.test.tsx +20 -0
- package/dist/template/zhiguan/src/pages/404.tsx +32 -0
- package/dist/template/zhiguan/src/pages/about/index.tsx +8 -0
- package/dist/template/zhiguan/src/pages/calendar/index.tsx +8 -0
- package/dist/template/zhiguan/src/pages/dashboard/index.tsx +72 -0
- package/dist/template/zhiguan/src/pages/home/index.less +59 -0
- package/dist/template/zhiguan/src/pages/home/index.tsx +217 -0
- package/dist/template/zhiguan/src/pages/settings/index.tsx +8 -0
- package/dist/template/zhiguan/src/pages/workspace/index.tsx +8 -0
- package/dist/template/zhiguan/src/router/index.tsx +81 -0
- package/dist/template/zhiguan/src/setupTests.ts +1 -0
- package/dist/template/zhiguan/src/store/useCounterStore.ts +24 -0
- package/dist/template/zhiguan/src/style.less +3 -0
- package/dist/template/zhiguan/src/utils/request/index.ts +108 -0
- package/dist/template/zhiguan/src/vite-env.d.ts +12 -0
- package/dist/template/zhiguan/tsconfig.app.json +34 -0
- package/dist/template/zhiguan/tsconfig.json +7 -0
- package/dist/template/zhiguan/tsconfig.node.json +26 -0
- package/dist/template/zhiguan/vite.config.ts +77 -0
- package/package.json +1 -1
- package/dist/template/operations-tem/package-lock.json +0 -4672
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 路由配置 (React Router Data API)
|
|
3
|
+
* 采用对象配置模式,便于管理和扩展
|
|
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';
|
|
9
|
+
|
|
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'));
|
|
18
|
+
|
|
19
|
+
// 全局 Loading 组件
|
|
20
|
+
const Loading = () => (
|
|
21
|
+
<div
|
|
22
|
+
style={{
|
|
23
|
+
display: 'flex',
|
|
24
|
+
justifyContent: 'center',
|
|
25
|
+
alignItems: 'center',
|
|
26
|
+
height: '100%',
|
|
27
|
+
minHeight: 400,
|
|
28
|
+
}}
|
|
29
|
+
>
|
|
30
|
+
<Spin size="large" />
|
|
31
|
+
</div>
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
// 包装懒加载组件,统一添加 Suspense
|
|
35
|
+
function withSuspense(Component: LazyExoticComponent<ComponentType<any>>) {
|
|
36
|
+
return (
|
|
37
|
+
<Suspense fallback={<Loading />}>
|
|
38
|
+
<Component />
|
|
39
|
+
</Suspense>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export const router = createBrowserRouter([
|
|
44
|
+
{
|
|
45
|
+
path: '/',
|
|
46
|
+
// 根布局:BasicLayout (包含侧边栏和 Header)
|
|
47
|
+
element: <BasicLayout />,
|
|
48
|
+
// 子路由:渲染在 BasicLayout 的 <Outlet /> 中
|
|
49
|
+
children: [
|
|
50
|
+
{
|
|
51
|
+
index: true, // 默认子路由 (首页)
|
|
52
|
+
element: withSuspense(Home),
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
path: 'dashboard',
|
|
56
|
+
element: withSuspense(Dashboard),
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
path: 'about',
|
|
60
|
+
element: withSuspense(About),
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
path: 'workspace',
|
|
64
|
+
element: withSuspense(Workspace),
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
path: 'calendar',
|
|
68
|
+
element: withSuspense(Calendar),
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
path: 'settings',
|
|
72
|
+
element: withSuspense(Settings),
|
|
73
|
+
},
|
|
74
|
+
// 404 页面配置
|
|
75
|
+
{
|
|
76
|
+
path: '*',
|
|
77
|
+
element: withSuspense(NotFound),
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
},
|
|
81
|
+
]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@testing-library/jest-dom';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { create } from 'zustand';
|
|
2
|
+
|
|
3
|
+
// 1. 定义状态接口
|
|
4
|
+
interface CounterState {
|
|
5
|
+
count: number;
|
|
6
|
+
increment: () => void;
|
|
7
|
+
decrement: () => void;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 全局计数器状态 (Zustand Store)
|
|
12
|
+
* 这是一个简单的状态管理示例,演示如何使用 Zustand
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* // 在组件中使用
|
|
16
|
+
* const { count, increment } = useCounterStore()
|
|
17
|
+
*/
|
|
18
|
+
export const useCounterStore = create<CounterState>()((set) => ({
|
|
19
|
+
// 初始状态
|
|
20
|
+
count: 0,
|
|
21
|
+
// 修改状态的方法 (Action)
|
|
22
|
+
increment: () => set((state) => ({ count: state.count + 1 })),
|
|
23
|
+
decrement: () => set((state) => ({ count: state.count - 1 })),
|
|
24
|
+
}));
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 通用网络请求工具 (Axios Encapsulation)
|
|
3
|
+
* 封装了全局请求拦截、响应处理和错误统一处理
|
|
4
|
+
*/
|
|
5
|
+
import axios, { type AxiosRequestConfig, type AxiosResponse } from 'axios';
|
|
6
|
+
|
|
7
|
+
// 定义通用的后端响应结构
|
|
8
|
+
export interface BaseResponse<T = unknown> {
|
|
9
|
+
code: number; // 业务状态码 (0/200: 成功, 其他: 失败)
|
|
10
|
+
data: T; // 业务数据
|
|
11
|
+
message: string; // 提示信息
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// 创建 Axios 实例的工厂函数
|
|
15
|
+
function createRequest(config: AxiosRequestConfig) {
|
|
16
|
+
const instance = axios.create(config);
|
|
17
|
+
|
|
18
|
+
// 请求拦截器
|
|
19
|
+
instance.interceptors.request.use(
|
|
20
|
+
(reqConfig) => {
|
|
21
|
+
// 在发送请求之前做些什么,例如添加 token
|
|
22
|
+
const token = localStorage.getItem('token');
|
|
23
|
+
if (token && reqConfig.headers) {
|
|
24
|
+
reqConfig.headers.Authorization = `Bearer ${token}`;
|
|
25
|
+
}
|
|
26
|
+
return reqConfig;
|
|
27
|
+
},
|
|
28
|
+
(error) => {
|
|
29
|
+
return Promise.reject(error);
|
|
30
|
+
},
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
// 响应拦截器
|
|
34
|
+
instance.interceptors.response.use(
|
|
35
|
+
(response: AxiosResponse<BaseResponse>) => {
|
|
36
|
+
const { data } = response;
|
|
37
|
+
// 根据自定义的 code 判断请求是否成功 (假设 0 或 200 为成功)
|
|
38
|
+
if (data.code === 0 || data.code === 200) {
|
|
39
|
+
return data.data as any; // 拆包返回 data
|
|
40
|
+
} else {
|
|
41
|
+
// 处理业务错误,例如提示用户
|
|
42
|
+
console.error(data.message || '请求失败');
|
|
43
|
+
return Promise.reject(new Error(data.message || '请求失败'));
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
(error) => {
|
|
47
|
+
// 处理 HTTP 错误,例如 401, 404, 500 等
|
|
48
|
+
if (error.response) {
|
|
49
|
+
const status = error.response.status;
|
|
50
|
+
switch (status) {
|
|
51
|
+
case 401:
|
|
52
|
+
console.error('未授权,请重新登录');
|
|
53
|
+
// 执行登出逻辑等
|
|
54
|
+
break;
|
|
55
|
+
case 403:
|
|
56
|
+
console.error('拒绝访问');
|
|
57
|
+
break;
|
|
58
|
+
case 404:
|
|
59
|
+
console.error('请求地址错误');
|
|
60
|
+
break;
|
|
61
|
+
case 500:
|
|
62
|
+
console.error('服务器内部错误');
|
|
63
|
+
break;
|
|
64
|
+
default:
|
|
65
|
+
console.error(`请求错误: ${status}`);
|
|
66
|
+
}
|
|
67
|
+
} else {
|
|
68
|
+
console.error('网络连接异常,请稍后再试!');
|
|
69
|
+
}
|
|
70
|
+
return Promise.reject(error);
|
|
71
|
+
},
|
|
72
|
+
);
|
|
73
|
+
|
|
74
|
+
// 返回封装好的请求方法对象
|
|
75
|
+
return {
|
|
76
|
+
/**
|
|
77
|
+
* 发送 GET 请求
|
|
78
|
+
* @param url 请求地址
|
|
79
|
+
* @param config Axios 配置
|
|
80
|
+
*/
|
|
81
|
+
get: <T = unknown>(url: string, config?: AxiosRequestConfig): Promise<T> => {
|
|
82
|
+
return instance.get(url, config);
|
|
83
|
+
},
|
|
84
|
+
/**
|
|
85
|
+
* 发送 POST 请求
|
|
86
|
+
* @param url 请求地址
|
|
87
|
+
* @param data 请求体数据
|
|
88
|
+
* @param config Axios 配置
|
|
89
|
+
*/
|
|
90
|
+
post: <T = unknown>(url: string, data?: unknown, config?: AxiosRequestConfig): Promise<T> => {
|
|
91
|
+
return instance.post(url, data, config);
|
|
92
|
+
},
|
|
93
|
+
put: <T = unknown>(url: string, data?: unknown, config?: AxiosRequestConfig): Promise<T> => {
|
|
94
|
+
return instance.put(url, data, config);
|
|
95
|
+
},
|
|
96
|
+
delete: <T = unknown>(url: string, config?: AxiosRequestConfig): Promise<T> => {
|
|
97
|
+
return instance.delete(url, config);
|
|
98
|
+
},
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// 导出默认 request 实例
|
|
103
|
+
// 可以直接 import { request } from '@/utils/request' 使用
|
|
104
|
+
export const request = createRequest({
|
|
105
|
+
// 从环境变量 VITE_API_BASE_URL 获取基础地址,默认为 /api
|
|
106
|
+
baseURL: import.meta.env.VITE_API_BASE_URL || '/api',
|
|
107
|
+
timeout: 10000, // 超时时间 10s
|
|
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
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
|
4
|
+
"target": "ES2023",
|
|
5
|
+
"useDefineForClassFields": true,
|
|
6
|
+
"lib": ["ES2023", "DOM", "DOM.Iterable"],
|
|
7
|
+
"module": "ESNext",
|
|
8
|
+
"types": ["vite/client", "node"],
|
|
9
|
+
"skipLibCheck": true,
|
|
10
|
+
|
|
11
|
+
/* Bundler mode */
|
|
12
|
+
"moduleResolution": "bundler",
|
|
13
|
+
"allowImportingTsExtensions": true,
|
|
14
|
+
"verbatimModuleSyntax": true,
|
|
15
|
+
"moduleDetection": "force",
|
|
16
|
+
"noEmit": true,
|
|
17
|
+
"jsx": "react-jsx",
|
|
18
|
+
|
|
19
|
+
/* Path Aliases */
|
|
20
|
+
"baseUrl": ".",
|
|
21
|
+
"paths": {
|
|
22
|
+
"@/*": ["src/*"]
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
/* Linting */
|
|
26
|
+
"strict": true,
|
|
27
|
+
"noUnusedLocals": true,
|
|
28
|
+
"noUnusedParameters": true,
|
|
29
|
+
"erasableSyntaxOnly": true,
|
|
30
|
+
"noFallthroughCasesInSwitch": true,
|
|
31
|
+
"noUncheckedSideEffectImports": true
|
|
32
|
+
},
|
|
33
|
+
"include": ["src"]
|
|
34
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
|
4
|
+
"target": "ES2023",
|
|
5
|
+
"lib": ["ES2023"],
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"types": ["node"],
|
|
8
|
+
"skipLibCheck": true,
|
|
9
|
+
|
|
10
|
+
/* Bundler mode */
|
|
11
|
+
"moduleResolution": "bundler",
|
|
12
|
+
"allowImportingTsExtensions": true,
|
|
13
|
+
"verbatimModuleSyntax": true,
|
|
14
|
+
"moduleDetection": "force",
|
|
15
|
+
"noEmit": true,
|
|
16
|
+
|
|
17
|
+
/* Linting */
|
|
18
|
+
"strict": true,
|
|
19
|
+
"noUnusedLocals": true,
|
|
20
|
+
"noUnusedParameters": true,
|
|
21
|
+
"erasableSyntaxOnly": true,
|
|
22
|
+
"noFallthroughCasesInSwitch": true,
|
|
23
|
+
"noUncheckedSideEffectImports": true
|
|
24
|
+
},
|
|
25
|
+
"include": ["vite.config.ts"]
|
|
26
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { defineConfig } from 'vitest/config'
|
|
2
|
+
import react, { reactCompilerPreset } from '@vitejs/plugin-react'
|
|
3
|
+
import babel from '@rolldown/plugin-babel'
|
|
4
|
+
import path from 'path'
|
|
5
|
+
import { visualizer } from 'rollup-plugin-visualizer'
|
|
6
|
+
|
|
7
|
+
// https://vite.dev/config/
|
|
8
|
+
export default defineConfig({
|
|
9
|
+
plugins: [
|
|
10
|
+
react(),
|
|
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
|
+
}),
|
|
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
|
+
},
|
|
59
|
+
css: {
|
|
60
|
+
preprocessorOptions: {
|
|
61
|
+
less: {
|
|
62
|
+
javascriptEnabled: true,
|
|
63
|
+
},
|
|
64
|
+
},
|
|
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
|
+
},
|
|
77
|
+
})
|