@chenhui996/gg-cli 1.0.7 → 1.0.9
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/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/template/main-app/.env.development +7 -0
- package/dist/template/main-app/.env.production +7 -0
- package/dist/template/{zhiguan → main-app}/README.md +13 -10
- package/dist/template/main-app/docs//345/276/256/345/211/215/347/253/257/346/236/266/346/236/204/350/256/276/350/256/241/344/270/216/345/274/200/345/217/221/346/214/207/345/215/227.md +285 -0
- package/dist/template/{zhiguan → main-app}/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 +24 -15
- package/dist/template/{zhiguan → main-app}/package.json +4 -2
- package/dist/template/{zhiguan → main-app}/src/api/user.ts +1 -1
- package/dist/template/main-app/src/components/AuthRoute/index.tsx +25 -0
- package/dist/template/{zhiguan → main-app}/src/layouts/BasicLayout.tsx +15 -7
- package/dist/template/main-app/src/main.tsx +36 -0
- package/dist/template/{zhiguan → main-app}/src/pages/404.test.tsx +1 -1
- package/dist/template/{zhiguan → main-app}/src/pages/home/index.tsx +2 -68
- package/dist/template/main-app/src/pages/login/index.tsx +97 -0
- package/dist/template/main-app/src/pages/micro-app/index.tsx +12 -0
- package/dist/template/{zhiguan → main-app}/src/router/index.tsx +18 -2
- package/dist/template/main-app/src/store/useGlobalStore.ts +29 -0
- package/dist/template/main-app/src/style.less +40 -0
- package/dist/template/main-app/src/utils/request/index.ts +113 -0
- package/dist/template/{zhiguan → main-app}/src/vite-env.d.ts +1 -0
- package/dist/template/{zhiguan → main-app}/vite.config.ts +28 -0
- package/dist/template/micro-app/.editorconfig +16 -0
- package/dist/template/micro-app/.env +1 -0
- package/dist/template/micro-app/.env.test +4 -0
- package/dist/template/micro-app/.prettierignore +34 -0
- package/dist/template/micro-app/.prettierrc +14 -0
- package/dist/template/micro-app/README.md +186 -0
- package/dist/template/micro-app/eslint.config.js +27 -0
- package/dist/template/micro-app/package-lock.json +7274 -0
- package/dist/template/micro-app/package.json +63 -0
- package/dist/template/micro-app/src/api/user.ts +21 -0
- package/dist/template/micro-app/src/assets/Frame 20.png +0 -0
- package/dist/template/micro-app/src/components/Chart/index.tsx +22 -0
- package/dist/template/micro-app/src/components/ErrorBoundary/index.tsx +82 -0
- package/dist/template/micro-app/src/layouts/BasicLayout.tsx +21 -0
- package/dist/template/micro-app/src/main.tsx +47 -0
- package/dist/template/micro-app/src/pages/404.test.tsx +20 -0
- package/dist/template/micro-app/src/pages/404.tsx +32 -0
- package/dist/template/micro-app/src/pages/home/index.less +59 -0
- package/dist/template/micro-app/src/pages/home/index.tsx +165 -0
- package/dist/template/micro-app/src/router/index.tsx +62 -0
- package/dist/template/micro-app/src/setupTests.ts +1 -0
- package/dist/template/micro-app/src/store/useGlobalStore.ts +20 -0
- package/dist/template/micro-app/src/vite-env.d.ts +16 -0
- package/dist/template/{react19 → micro-app}/tsconfig.app.json +7 -1
- package/dist/template/micro-app/vite.config.ts +116 -0
- package/dist/template/operations-tem/gitignore +24 -0
- package/package.json +1 -1
- package/dist/template/react19/README.md +0 -75
- package/dist/template/react19/eslint.config.js +0 -23
- package/dist/template/react19/package.json +0 -34
- package/dist/template/react19/src/App.css +0 -184
- package/dist/template/react19/src/App.tsx +0 -121
- package/dist/template/react19/src/assets/hero.png +0 -0
- package/dist/template/react19/src/assets/vite.svg +0 -1
- package/dist/template/react19/src/index.css +0 -111
- package/dist/template/react19/src/main.tsx +0 -10
- package/dist/template/react19/vite.config.ts +0 -11
- package/dist/template/zhiguan/src/main.tsx +0 -38
- package/dist/template/zhiguan/src/store/useCounterStore.ts +0 -24
- /package/dist/template/{zhiguan → main-app}/.editorconfig +0 -0
- /package/dist/template/{zhiguan → main-app}/.env +0 -0
- /package/dist/template/{zhiguan → main-app}/.env.test +0 -0
- /package/dist/template/{zhiguan → main-app}/.prettierignore +0 -0
- /package/dist/template/{zhiguan → main-app}/.prettierrc +0 -0
- /package/dist/template/{zhiguan → main-app}/docs/Git/345/274/200/345/217/221/350/247/204/350/214/203.md" +0 -0
- /package/dist/template/{zhiguan → main-app}/docs/React/345/274/200/345/217/221/350/247/204/350/214/203.md" +0 -0
- /package/dist/template/{zhiguan → main-app}/docs/TypeScript/345/274/200/345/217/221/350/247/204/350/214/203.md" +0 -0
- /package/dist/template/{zhiguan → main-app}/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" +0 -0
- /package/dist/template/{zhiguan → main-app}/docs//345/215/225/345/205/203/346/265/213/350/257/225/350/247/204/350/214/203.md" +0 -0
- /package/dist/template/{zhiguan → main-app}/eslint.config.js +0 -0
- /package/dist/template/{react19 → main-app}/index.html +0 -0
- /package/dist/template/{react19 → main-app}/public/favicon.svg +0 -0
- /package/dist/template/{react19 → main-app}/public/icons.svg +0 -0
- /package/dist/template/{zhiguan → main-app}/src/assets/Frame 20.png +0 -0
- /package/dist/template/{react19 → main-app}/src/assets/react.svg +0 -0
- /package/dist/template/{zhiguan → main-app}/src/components/Chart/index.tsx +0 -0
- /package/dist/template/{zhiguan → main-app}/src/components/ErrorBoundary/index.tsx +0 -0
- /package/dist/template/{zhiguan → main-app}/src/pages/404.tsx +0 -0
- /package/dist/template/{zhiguan → main-app}/src/pages/about/index.tsx +0 -0
- /package/dist/template/{zhiguan → main-app}/src/pages/calendar/index.tsx +0 -0
- /package/dist/template/{zhiguan → main-app}/src/pages/dashboard/index.tsx +0 -0
- /package/dist/template/{zhiguan → main-app}/src/pages/home/index.less +0 -0
- /package/dist/template/{zhiguan → main-app}/src/pages/settings/index.tsx +0 -0
- /package/dist/template/{zhiguan → main-app}/src/pages/workspace/index.tsx +0 -0
- /package/dist/template/{zhiguan → main-app}/src/setupTests.ts +0 -0
- /package/dist/template/{zhiguan → main-app}/tsconfig.app.json +0 -0
- /package/dist/template/{react19 → main-app}/tsconfig.json +0 -0
- /package/dist/template/{react19 → main-app}/tsconfig.node.json +0 -0
- /package/dist/template/{zhiguan → micro-app}/.env.development +0 -0
- /package/dist/template/{zhiguan → micro-app}/.env.production +0 -0
- /package/dist/template/{zhiguan → micro-app}/index.html +0 -0
- /package/dist/template/{zhiguan → micro-app}/public/favicon.svg +0 -0
- /package/dist/template/{zhiguan → micro-app}/public/icons.svg +0 -0
- /package/dist/template/{zhiguan → micro-app}/src/assets/react.svg +0 -0
- /package/dist/template/{zhiguan → micro-app}/src/style.less +0 -0
- /package/dist/template/{zhiguan → micro-app}/src/utils/request/index.ts +0 -0
- /package/dist/template/{zhiguan → micro-app}/tsconfig.json +0 -0
- /package/dist/template/{zhiguan → micro-app}/tsconfig.node.json +0 -0
|
@@ -0,0 +1,116 @@
|
|
|
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
|
+
import garfishPlugin from 'vite-plugin-garfish-mf'
|
|
7
|
+
// import cdn from 'vite-plugin-cdn-import'
|
|
8
|
+
|
|
9
|
+
// https://vite.dev/config/
|
|
10
|
+
export default defineConfig({
|
|
11
|
+
base: 'http://localhost:3001/',
|
|
12
|
+
server: {
|
|
13
|
+
port: 3001,
|
|
14
|
+
cors: true,
|
|
15
|
+
origin: 'http://localhost:3001',
|
|
16
|
+
},
|
|
17
|
+
// 其他配置...
|
|
18
|
+
plugins: [
|
|
19
|
+
react(),
|
|
20
|
+
garfishPlugin({
|
|
21
|
+
base: "http://localhost:3001",
|
|
22
|
+
}),
|
|
23
|
+
// 暂时注释 CDN 抽离配置,因为内网环境暂不支持
|
|
24
|
+
/*
|
|
25
|
+
cdn({
|
|
26
|
+
modules: [
|
|
27
|
+
{
|
|
28
|
+
name: 'react',
|
|
29
|
+
var: 'React',
|
|
30
|
+
path: `https://unpkg.com/react@19.2.4/umd/react.production.min.js`,
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: 'react-dom',
|
|
34
|
+
var: 'ReactDOM',
|
|
35
|
+
path: `https://unpkg.com/react-dom@19.2.4/umd/react-dom.production.min.js`,
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: 'dayjs',
|
|
39
|
+
var: 'dayjs',
|
|
40
|
+
path: `https://unpkg.com/dayjs@1.11.10/dayjs.min.js`,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'antd',
|
|
44
|
+
var: 'antd',
|
|
45
|
+
path: `https://unpkg.com/antd@6.3.3/dist/antd.min.js`,
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
}),
|
|
49
|
+
*/
|
|
50
|
+
babel({ presets: [reactCompilerPreset()] }),
|
|
51
|
+
process.env.ANALYZE === 'true' && visualizer({
|
|
52
|
+
open: true,
|
|
53
|
+
gzipSize: true,
|
|
54
|
+
brotliSize: true,
|
|
55
|
+
filename: 'dist/stats.html',
|
|
56
|
+
}),
|
|
57
|
+
],
|
|
58
|
+
resolve: {
|
|
59
|
+
alias: {
|
|
60
|
+
'@': path.resolve(__dirname, './src'),
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
// 生产环境打包配置
|
|
64
|
+
build: {
|
|
65
|
+
// 消除打包大小超过 500kb 警告
|
|
66
|
+
chunkSizeWarningLimit: 2000,
|
|
67
|
+
minify: 'terser',
|
|
68
|
+
terserOptions: {
|
|
69
|
+
compress: {
|
|
70
|
+
drop_console: process.env.NODE_ENV === 'production',
|
|
71
|
+
drop_debugger: process.env.NODE_ENV === 'production',
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
rollupOptions: {
|
|
75
|
+
output: {
|
|
76
|
+
// 静态资源分类打包
|
|
77
|
+
chunkFileNames: 'assets/js/[name]-[hash].js',
|
|
78
|
+
entryFileNames: 'assets/js/[name]-[hash].js',
|
|
79
|
+
assetFileNames: 'assets/[ext]/[name]-[hash].[ext]',
|
|
80
|
+
// 手动分包策略
|
|
81
|
+
manualChunks(id) {
|
|
82
|
+
// 1. 将 react 核心全家桶打包到一起
|
|
83
|
+
if (id.includes('node_modules/react') || id.includes('node_modules/react-dom') || id.includes('node_modules/react-router-dom')) {
|
|
84
|
+
return 'vendor-react';
|
|
85
|
+
}
|
|
86
|
+
// 2. 将 echarts 单独打包 (体积较大)
|
|
87
|
+
if (id.includes('node_modules/echarts') || id.includes('node_modules/zrender')) {
|
|
88
|
+
return 'vendor-echarts';
|
|
89
|
+
}
|
|
90
|
+
// 3. 将 antd 和图标单独打包
|
|
91
|
+
if (id.includes('node_modules/antd') || id.includes('node_modules/@ant-design')) {
|
|
92
|
+
return 'vendor-antd';
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
css: {
|
|
99
|
+
preprocessorOptions: {
|
|
100
|
+
less: {
|
|
101
|
+
javascriptEnabled: true,
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
// Vitest 测试配置
|
|
106
|
+
test: {
|
|
107
|
+
environment: 'jsdom',
|
|
108
|
+
globals: true,
|
|
109
|
+
setupFiles: './src/setupTests.ts',
|
|
110
|
+
coverage: {
|
|
111
|
+
provider: 'v8',
|
|
112
|
+
reporter: ['text', 'json', 'html'],
|
|
113
|
+
exclude: ['node_modules/', 'src/setupTests.ts', 'dist/'],
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
})
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Logs
|
|
2
|
+
logs
|
|
3
|
+
*.log
|
|
4
|
+
npm-debug.log*
|
|
5
|
+
yarn-debug.log*
|
|
6
|
+
yarn-error.log*
|
|
7
|
+
pnpm-debug.log*
|
|
8
|
+
lerna-debug.log*
|
|
9
|
+
|
|
10
|
+
node_modules
|
|
11
|
+
dist
|
|
12
|
+
dist-ssr
|
|
13
|
+
*.local
|
|
14
|
+
|
|
15
|
+
# Editor directories and files
|
|
16
|
+
.vscode/*
|
|
17
|
+
!.vscode/extensions.json
|
|
18
|
+
.idea
|
|
19
|
+
.DS_Store
|
|
20
|
+
*.suo
|
|
21
|
+
*.ntvs*
|
|
22
|
+
*.njsproj
|
|
23
|
+
*.sln
|
|
24
|
+
*.sw?
|
package/package.json
CHANGED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
# React + TypeScript + Vite
|
|
2
|
-
|
|
3
|
-
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
|
|
4
|
-
|
|
5
|
-
Currently, two official plugins are available:
|
|
6
|
-
|
|
7
|
-
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs)
|
|
8
|
-
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/)
|
|
9
|
-
|
|
10
|
-
## React Compiler
|
|
11
|
-
|
|
12
|
-
The React Compiler is enabled on this template. See [this documentation](https://react.dev/learn/react-compiler) for more information.
|
|
13
|
-
|
|
14
|
-
Note: This will impact Vite dev & build performances.
|
|
15
|
-
|
|
16
|
-
## Expanding the ESLint configuration
|
|
17
|
-
|
|
18
|
-
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
|
|
19
|
-
|
|
20
|
-
```js
|
|
21
|
-
export default defineConfig([
|
|
22
|
-
globalIgnores(['dist']),
|
|
23
|
-
{
|
|
24
|
-
files: ['**/*.{ts,tsx}'],
|
|
25
|
-
extends: [
|
|
26
|
-
// Other configs...
|
|
27
|
-
|
|
28
|
-
// Remove tseslint.configs.recommended and replace with this
|
|
29
|
-
tseslint.configs.recommendedTypeChecked,
|
|
30
|
-
// Alternatively, use this for stricter rules
|
|
31
|
-
tseslint.configs.strictTypeChecked,
|
|
32
|
-
// Optionally, add this for stylistic rules
|
|
33
|
-
tseslint.configs.stylisticTypeChecked,
|
|
34
|
-
|
|
35
|
-
// Other configs...
|
|
36
|
-
],
|
|
37
|
-
languageOptions: {
|
|
38
|
-
parserOptions: {
|
|
39
|
-
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
40
|
-
tsconfigRootDir: import.meta.dirname,
|
|
41
|
-
},
|
|
42
|
-
// other options...
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
])
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
|
|
49
|
-
|
|
50
|
-
```js
|
|
51
|
-
// eslint.config.js
|
|
52
|
-
import reactX from 'eslint-plugin-react-x'
|
|
53
|
-
import reactDom from 'eslint-plugin-react-dom'
|
|
54
|
-
|
|
55
|
-
export default defineConfig([
|
|
56
|
-
globalIgnores(['dist']),
|
|
57
|
-
{
|
|
58
|
-
files: ['**/*.{ts,tsx}'],
|
|
59
|
-
extends: [
|
|
60
|
-
// Other configs...
|
|
61
|
-
// Enable lint rules for React
|
|
62
|
-
reactX.configs['recommended-typescript'],
|
|
63
|
-
// Enable lint rules for React DOM
|
|
64
|
-
reactDom.configs.recommended,
|
|
65
|
-
],
|
|
66
|
-
languageOptions: {
|
|
67
|
-
parserOptions: {
|
|
68
|
-
project: ['./tsconfig.node.json', './tsconfig.app.json'],
|
|
69
|
-
tsconfigRootDir: import.meta.dirname,
|
|
70
|
-
},
|
|
71
|
-
// other options...
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
])
|
|
75
|
-
```
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import js from '@eslint/js'
|
|
2
|
-
import globals from 'globals'
|
|
3
|
-
import reactHooks from 'eslint-plugin-react-hooks'
|
|
4
|
-
import reactRefresh from 'eslint-plugin-react-refresh'
|
|
5
|
-
import tseslint from 'typescript-eslint'
|
|
6
|
-
import { defineConfig, globalIgnores } from 'eslint/config'
|
|
7
|
-
|
|
8
|
-
export default defineConfig([
|
|
9
|
-
globalIgnores(['dist']),
|
|
10
|
-
{
|
|
11
|
-
files: ['**/*.{ts,tsx}'],
|
|
12
|
-
extends: [
|
|
13
|
-
js.configs.recommended,
|
|
14
|
-
tseslint.configs.recommended,
|
|
15
|
-
reactHooks.configs.flat.recommended,
|
|
16
|
-
reactRefresh.configs.vite,
|
|
17
|
-
],
|
|
18
|
-
languageOptions: {
|
|
19
|
-
ecmaVersion: 2020,
|
|
20
|
-
globals: globals.browser,
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
])
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "react-temp1",
|
|
3
|
-
"private": true,
|
|
4
|
-
"version": "0.0.0",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"dev": "vite",
|
|
8
|
-
"build": "tsc -b && vite build",
|
|
9
|
-
"lint": "eslint .",
|
|
10
|
-
"preview": "vite preview"
|
|
11
|
-
},
|
|
12
|
-
"dependencies": {
|
|
13
|
-
"react": "^19.2.4",
|
|
14
|
-
"react-dom": "^19.2.4"
|
|
15
|
-
},
|
|
16
|
-
"devDependencies": {
|
|
17
|
-
"@babel/core": "^7.29.0",
|
|
18
|
-
"@eslint/js": "^9.39.4",
|
|
19
|
-
"@rolldown/plugin-babel": "^0.2.0",
|
|
20
|
-
"@types/babel__core": "^7.20.5",
|
|
21
|
-
"@types/node": "^24.12.0",
|
|
22
|
-
"@types/react": "^19.2.14",
|
|
23
|
-
"@types/react-dom": "^19.2.3",
|
|
24
|
-
"@vitejs/plugin-react": "^6.0.0",
|
|
25
|
-
"babel-plugin-react-compiler": "^1.0.0",
|
|
26
|
-
"eslint": "^9.39.4",
|
|
27
|
-
"eslint-plugin-react-hooks": "^7.0.1",
|
|
28
|
-
"eslint-plugin-react-refresh": "^0.5.2",
|
|
29
|
-
"globals": "^17.4.0",
|
|
30
|
-
"typescript": "~5.9.3",
|
|
31
|
-
"typescript-eslint": "^8.56.1",
|
|
32
|
-
"vite": "^8.0.0"
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
.counter {
|
|
2
|
-
font-size: 16px;
|
|
3
|
-
padding: 5px 10px;
|
|
4
|
-
border-radius: 5px;
|
|
5
|
-
color: var(--accent);
|
|
6
|
-
background: var(--accent-bg);
|
|
7
|
-
border: 2px solid transparent;
|
|
8
|
-
transition: border-color 0.3s;
|
|
9
|
-
margin-bottom: 24px;
|
|
10
|
-
|
|
11
|
-
&:hover {
|
|
12
|
-
border-color: var(--accent-border);
|
|
13
|
-
}
|
|
14
|
-
&:focus-visible {
|
|
15
|
-
outline: 2px solid var(--accent);
|
|
16
|
-
outline-offset: 2px;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.hero {
|
|
21
|
-
position: relative;
|
|
22
|
-
|
|
23
|
-
.base,
|
|
24
|
-
.framework,
|
|
25
|
-
.vite {
|
|
26
|
-
inset-inline: 0;
|
|
27
|
-
margin: 0 auto;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.base {
|
|
31
|
-
width: 170px;
|
|
32
|
-
position: relative;
|
|
33
|
-
z-index: 0;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.framework,
|
|
37
|
-
.vite {
|
|
38
|
-
position: absolute;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.framework {
|
|
42
|
-
z-index: 1;
|
|
43
|
-
top: 34px;
|
|
44
|
-
height: 28px;
|
|
45
|
-
transform: perspective(2000px) rotateZ(300deg) rotateX(44deg) rotateY(39deg)
|
|
46
|
-
scale(1.4);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.vite {
|
|
50
|
-
z-index: 0;
|
|
51
|
-
top: 107px;
|
|
52
|
-
height: 26px;
|
|
53
|
-
width: auto;
|
|
54
|
-
transform: perspective(2000px) rotateZ(300deg) rotateX(40deg) rotateY(39deg)
|
|
55
|
-
scale(0.8);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
#center {
|
|
60
|
-
display: flex;
|
|
61
|
-
flex-direction: column;
|
|
62
|
-
gap: 25px;
|
|
63
|
-
place-content: center;
|
|
64
|
-
place-items: center;
|
|
65
|
-
flex-grow: 1;
|
|
66
|
-
|
|
67
|
-
@media (max-width: 1024px) {
|
|
68
|
-
padding: 32px 20px 24px;
|
|
69
|
-
gap: 18px;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
#next-steps {
|
|
74
|
-
display: flex;
|
|
75
|
-
border-top: 1px solid var(--border);
|
|
76
|
-
text-align: left;
|
|
77
|
-
|
|
78
|
-
& > div {
|
|
79
|
-
flex: 1 1 0;
|
|
80
|
-
padding: 32px;
|
|
81
|
-
@media (max-width: 1024px) {
|
|
82
|
-
padding: 24px 20px;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.icon {
|
|
87
|
-
margin-bottom: 16px;
|
|
88
|
-
width: 22px;
|
|
89
|
-
height: 22px;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
@media (max-width: 1024px) {
|
|
93
|
-
flex-direction: column;
|
|
94
|
-
text-align: center;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
#docs {
|
|
99
|
-
border-right: 1px solid var(--border);
|
|
100
|
-
|
|
101
|
-
@media (max-width: 1024px) {
|
|
102
|
-
border-right: none;
|
|
103
|
-
border-bottom: 1px solid var(--border);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
#next-steps ul {
|
|
108
|
-
list-style: none;
|
|
109
|
-
padding: 0;
|
|
110
|
-
display: flex;
|
|
111
|
-
gap: 8px;
|
|
112
|
-
margin: 32px 0 0;
|
|
113
|
-
|
|
114
|
-
.logo {
|
|
115
|
-
height: 18px;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
a {
|
|
119
|
-
color: var(--text-h);
|
|
120
|
-
font-size: 16px;
|
|
121
|
-
border-radius: 6px;
|
|
122
|
-
background: var(--social-bg);
|
|
123
|
-
display: flex;
|
|
124
|
-
padding: 6px 12px;
|
|
125
|
-
align-items: center;
|
|
126
|
-
gap: 8px;
|
|
127
|
-
text-decoration: none;
|
|
128
|
-
transition: box-shadow 0.3s;
|
|
129
|
-
|
|
130
|
-
&:hover {
|
|
131
|
-
box-shadow: var(--shadow);
|
|
132
|
-
}
|
|
133
|
-
.button-icon {
|
|
134
|
-
height: 18px;
|
|
135
|
-
width: 18px;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
@media (max-width: 1024px) {
|
|
140
|
-
margin-top: 20px;
|
|
141
|
-
flex-wrap: wrap;
|
|
142
|
-
justify-content: center;
|
|
143
|
-
|
|
144
|
-
li {
|
|
145
|
-
flex: 1 1 calc(50% - 8px);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
a {
|
|
149
|
-
width: 100%;
|
|
150
|
-
justify-content: center;
|
|
151
|
-
box-sizing: border-box;
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
#spacer {
|
|
157
|
-
height: 88px;
|
|
158
|
-
border-top: 1px solid var(--border);
|
|
159
|
-
@media (max-width: 1024px) {
|
|
160
|
-
height: 48px;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.ticks {
|
|
165
|
-
position: relative;
|
|
166
|
-
width: 100%;
|
|
167
|
-
|
|
168
|
-
&::before,
|
|
169
|
-
&::after {
|
|
170
|
-
content: '';
|
|
171
|
-
position: absolute;
|
|
172
|
-
top: -4.5px;
|
|
173
|
-
border: 5px solid transparent;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
&::before {
|
|
177
|
-
left: 0;
|
|
178
|
-
border-left-color: var(--border);
|
|
179
|
-
}
|
|
180
|
-
&::after {
|
|
181
|
-
right: 0;
|
|
182
|
-
border-right-color: var(--border);
|
|
183
|
-
}
|
|
184
|
-
}
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
import { useState } from 'react'
|
|
2
|
-
import reactLogo from './assets/react.svg'
|
|
3
|
-
import viteLogo from './assets/vite.svg'
|
|
4
|
-
import heroImg from './assets/hero.png'
|
|
5
|
-
import './App.css'
|
|
6
|
-
|
|
7
|
-
function App() {
|
|
8
|
-
const [count, setCount] = useState(0)
|
|
9
|
-
|
|
10
|
-
return (
|
|
11
|
-
<>
|
|
12
|
-
<section id="center">
|
|
13
|
-
<div className="hero">
|
|
14
|
-
<img src={heroImg} className="base" width="170" height="179" alt="" />
|
|
15
|
-
<img src={reactLogo} className="framework" alt="React logo" />
|
|
16
|
-
<img src={viteLogo} className="vite" alt="Vite logo" />
|
|
17
|
-
</div>
|
|
18
|
-
<div>
|
|
19
|
-
<h1>Get started</h1>
|
|
20
|
-
<p>
|
|
21
|
-
Edit <code>src/App.tsx</code> and save to test <code>HMR</code>
|
|
22
|
-
</p>
|
|
23
|
-
</div>
|
|
24
|
-
<button
|
|
25
|
-
className="counter"
|
|
26
|
-
onClick={() => setCount((count) => count + 1)}
|
|
27
|
-
>
|
|
28
|
-
Count is {count}
|
|
29
|
-
</button>
|
|
30
|
-
</section>
|
|
31
|
-
|
|
32
|
-
<div className="ticks"></div>
|
|
33
|
-
|
|
34
|
-
<section id="next-steps">
|
|
35
|
-
<div id="docs">
|
|
36
|
-
<svg className="icon" role="presentation" aria-hidden="true">
|
|
37
|
-
<use href="/icons.svg#documentation-icon"></use>
|
|
38
|
-
</svg>
|
|
39
|
-
<h2>Documentation</h2>
|
|
40
|
-
<p>Your questions, answered</p>
|
|
41
|
-
<ul>
|
|
42
|
-
<li>
|
|
43
|
-
<a href="https://vite.dev/" target="_blank">
|
|
44
|
-
<img className="logo" src={viteLogo} alt="" />
|
|
45
|
-
Explore Vite
|
|
46
|
-
</a>
|
|
47
|
-
</li>
|
|
48
|
-
<li>
|
|
49
|
-
<a href="https://react.dev/" target="_blank">
|
|
50
|
-
<img className="button-icon" src={reactLogo} alt="" />
|
|
51
|
-
Learn more
|
|
52
|
-
</a>
|
|
53
|
-
</li>
|
|
54
|
-
</ul>
|
|
55
|
-
</div>
|
|
56
|
-
<div id="social">
|
|
57
|
-
<svg className="icon" role="presentation" aria-hidden="true">
|
|
58
|
-
<use href="/icons.svg#social-icon"></use>
|
|
59
|
-
</svg>
|
|
60
|
-
<h2>Connect with us</h2>
|
|
61
|
-
<p>Join the Vite community</p>
|
|
62
|
-
<ul>
|
|
63
|
-
<li>
|
|
64
|
-
<a href="https://github.com/vitejs/vite" target="_blank">
|
|
65
|
-
<svg
|
|
66
|
-
className="button-icon"
|
|
67
|
-
role="presentation"
|
|
68
|
-
aria-hidden="true"
|
|
69
|
-
>
|
|
70
|
-
<use href="/icons.svg#github-icon"></use>
|
|
71
|
-
</svg>
|
|
72
|
-
GitHub
|
|
73
|
-
</a>
|
|
74
|
-
</li>
|
|
75
|
-
<li>
|
|
76
|
-
<a href="https://chat.vite.dev/" target="_blank">
|
|
77
|
-
<svg
|
|
78
|
-
className="button-icon"
|
|
79
|
-
role="presentation"
|
|
80
|
-
aria-hidden="true"
|
|
81
|
-
>
|
|
82
|
-
<use href="/icons.svg#discord-icon"></use>
|
|
83
|
-
</svg>
|
|
84
|
-
Discord
|
|
85
|
-
</a>
|
|
86
|
-
</li>
|
|
87
|
-
<li>
|
|
88
|
-
<a href="https://x.com/vite_js" target="_blank">
|
|
89
|
-
<svg
|
|
90
|
-
className="button-icon"
|
|
91
|
-
role="presentation"
|
|
92
|
-
aria-hidden="true"
|
|
93
|
-
>
|
|
94
|
-
<use href="/icons.svg#x-icon"></use>
|
|
95
|
-
</svg>
|
|
96
|
-
X.com
|
|
97
|
-
</a>
|
|
98
|
-
</li>
|
|
99
|
-
<li>
|
|
100
|
-
<a href="https://bsky.app/profile/vite.dev" target="_blank">
|
|
101
|
-
<svg
|
|
102
|
-
className="button-icon"
|
|
103
|
-
role="presentation"
|
|
104
|
-
aria-hidden="true"
|
|
105
|
-
>
|
|
106
|
-
<use href="/icons.svg#bluesky-icon"></use>
|
|
107
|
-
</svg>
|
|
108
|
-
Bluesky
|
|
109
|
-
</a>
|
|
110
|
-
</li>
|
|
111
|
-
</ul>
|
|
112
|
-
</div>
|
|
113
|
-
</section>
|
|
114
|
-
|
|
115
|
-
<div className="ticks"></div>
|
|
116
|
-
<section id="spacer"></section>
|
|
117
|
-
</>
|
|
118
|
-
)
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
export default App
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="77" height="47" fill="none" aria-labelledby="vite-logo-title" viewBox="0 0 77 47"><title id="vite-logo-title">Vite</title><style>.parenthesis{fill:#000}@media (prefers-color-scheme:dark){.parenthesis{fill:#fff}}</style><path fill="#9135ff" d="M40.151 45.71c-.663.844-2.02.374-2.02-.699V34.708a2.26 2.26 0 0 0-2.262-2.262H24.493c-.92 0-1.457-1.04-.92-1.788l7.479-10.471c1.07-1.498 0-3.578-1.842-3.578H15.443c-.92 0-1.456-1.04-.92-1.788l9.696-13.576c.213-.297.556-.474.92-.474h28.894c.92 0 1.456 1.04.92 1.788l-7.48 10.472c-1.07 1.497 0 3.578 1.842 3.578h11.376c.944 0 1.474 1.087.89 1.83L40.153 45.712z"/><mask id="a" width="48" height="47" x="14" y="0" maskUnits="userSpaceOnUse" style="mask-type:alpha"><path fill="#000" d="M40.047 45.71c-.663.843-2.02.374-2.02-.699V34.708a2.26 2.26 0 0 0-2.262-2.262H24.389c-.92 0-1.457-1.04-.92-1.788l7.479-10.472c1.07-1.497 0-3.578-1.842-3.578H15.34c-.92 0-1.456-1.04-.92-1.788l9.696-13.575c.213-.297.556-.474.92-.474H53.93c.92 0 1.456 1.04.92 1.788L47.37 13.03c-1.07 1.498 0 3.578 1.842 3.578h11.376c.944 0 1.474 1.088.89 1.831L40.049 45.712z"/></mask><g mask="url(#a)"><g filter="url(#b)"><ellipse cx="5.508" cy="14.704" fill="#eee6ff" rx="5.508" ry="14.704" transform="rotate(269.814 20.96 11.29)scale(-1 1)"/></g><g filter="url(#c)"><ellipse cx="10.399" cy="29.851" fill="#eee6ff" rx="10.399" ry="29.851" transform="rotate(89.814 -16.902 -8.275)scale(1 -1)"/></g><g filter="url(#d)"><ellipse cx="5.508" cy="30.487" fill="#8900ff" rx="5.508" ry="30.487" transform="rotate(89.814 -19.197 -7.127)scale(1 -1)"/></g><g filter="url(#e)"><ellipse cx="5.508" cy="30.599" fill="#8900ff" rx="5.508" ry="30.599" transform="rotate(89.814 -25.928 4.177)scale(1 -1)"/></g><g filter="url(#f)"><ellipse cx="5.508" cy="30.599" fill="#8900ff" rx="5.508" ry="30.599" transform="rotate(89.814 -25.738 5.52)scale(1 -1)"/></g><g filter="url(#g)"><ellipse cx="14.072" cy="22.078" fill="#eee6ff" rx="14.072" ry="22.078" transform="rotate(93.35 31.245 55.578)scale(-1 1)"/></g><g filter="url(#h)"><ellipse cx="3.47" cy="21.501" fill="#8900ff" rx="3.47" ry="21.501" transform="rotate(89.009 35.419 55.202)scale(-1 1)"/></g><g filter="url(#i)"><ellipse cx="3.47" cy="21.501" fill="#8900ff" rx="3.47" ry="21.501" transform="rotate(89.009 35.419 55.202)scale(-1 1)"/></g><g filter="url(#j)"><ellipse cx="14.592" cy="9.743" fill="#8900ff" rx="4.407" ry="29.108" transform="rotate(39.51 14.592 9.743)"/></g><g filter="url(#k)"><ellipse cx="61.728" cy="-5.321" fill="#8900ff" rx="4.407" ry="29.108" transform="rotate(37.892 61.728 -5.32)"/></g><g filter="url(#l)"><ellipse cx="55.618" cy="7.104" fill="#00c2ff" rx="5.971" ry="9.665" transform="rotate(37.892 55.618 7.104)"/></g><g filter="url(#m)"><ellipse cx="12.326" cy="39.103" fill="#8900ff" rx="4.407" ry="29.108" transform="rotate(37.892 12.326 39.103)"/></g><g filter="url(#n)"><ellipse cx="12.326" cy="39.103" fill="#8900ff" rx="4.407" ry="29.108" transform="rotate(37.892 12.326 39.103)"/></g><g filter="url(#o)"><ellipse cx="49.857" cy="30.678" fill="#8900ff" rx="4.407" ry="29.108" transform="rotate(37.892 49.857 30.678)"/></g><g filter="url(#p)"><ellipse cx="52.623" cy="33.171" fill="#00c2ff" rx="5.971" ry="15.297" transform="rotate(37.892 52.623 33.17)"/></g></g><path d="M6.919 0c-9.198 13.166-9.252 33.575 0 46.789h6.215c-9.25-13.214-9.196-33.623 0-46.789zm62.424 0h-6.215c9.198 13.166 9.252 33.575 0 46.789h6.215c9.25-13.214 9.196-33.623 0-46.789" class="parenthesis"/><defs><filter id="b" width="60.045" height="41.654" x="-5.564" y="16.92" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="7.659"/></filter><filter id="c" width="90.34" height="51.437" x="-40.407" y="-6.762" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="7.659"/></filter><filter id="d" width="79.355" height="29.4" x="-35.435" y="2.801" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="e" width="79.579" height="29.4" x="-30.84" y="20.8" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="f" width="79.579" height="29.4" x="-29.307" y="21.949" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="g" width="74.749" height="58.852" x="29.961" y="-17.13" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="7.659"/></filter><filter id="h" width="61.377" height="25.362" x="37.754" y="3.055" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="i" width="61.377" height="25.362" x="37.754" y="3.055" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="j" width="56.045" height="63.649" x="-13.43" y="-22.082" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="k" width="54.814" height="64.646" x="34.321" y="-37.644" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="l" width="33.541" height="35.313" x="38.847" y="-10.552" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="m" width="54.814" height="64.646" x="-15.081" y="6.78" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="n" width="54.814" height="64.646" x="-15.081" y="6.78" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="o" width="54.814" height="64.646" x="22.45" y="-1.645" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="p" width="39.409" height="43.623" x="32.919" y="11.36" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter></defs></svg>
|