Skip to content

Commit 32222a6

Browse files
committed
docs: 文档优化
1 parent 1f5901a commit 32222a6

File tree

5 files changed

+26
-9
lines changed

5 files changed

+26
-9
lines changed

Diff for: packages/docs/client.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
declare module 'virtual:react-app' {
1+
declare module 'virtual:react-pages' {
22
import type { RouteObject } from 'react-router-dom';
33

44
export const routes: RouteObject[];

Diff for: packages/docs/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
"main": "index.js",
1010
"scripts": {
1111
"dev": "vite dev",
12-
"build": "vite build",
12+
"build": "NODE_ENV=production vite build",
13+
"preview": "vite preview",
1314
"lint:type": "tsc --noEmit"
1415
},
1516
"dependencies": {

Diff for: packages/docs/src/App.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import classNames from 'classnames';
22
import type { PropsWithChildren } from 'react';
33
import { NavLink, useRoutes } from 'react-router-dom';
4-
import { routes } from 'virtual:react-app';
4+
import { routes } from 'virtual:react-pages';
55
import SvgIcon from './icons/SvgIcon';
66

77
function A({ children, to }: PropsWithChildren<{ to: string }>) {

Diff for: packages/docs/src/icons/unplugin.svg

+16
Loading

Diff for: packages/docs/src/pages/page.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,28 @@ export default function Page() {
55
return (
66
<div className="flex grow-1 flex-col items-center gap-20">
77
<div className="flex flex-col items-center gap-10 pt-15">
8-
<div className="flex items-center gap-4 text-8 text-blue-6">一个基于文件系统</div>
8+
<div className="flex items-center gap-4 text-6 text-blue-6">一个基于文件系统</div>
99

1010
<div className="grid grid-cols-3 place-items-center items-center gap-4">
1111
<div className="flex flex-col items-center justify-between gap-5">
1212
<SvgIcon className="h-30 w-30" icon="react" />
13-
<span className="text-10 text-#007398">React 应用</span>
13+
<span className="text-8 text-#007398">React 应用</span>
1414
</div>
1515
<span className="text-8 text-gray">×</span>
1616
<div className="flex flex-col items-center justify-between gap-5">
1717
<SvgIcon className="h-30 w-30" icon="react-router" />
18-
<span className="text-10 text-#D30019">React Router</span>
18+
<span className="text-8 text-#D30019">React Router</span>
1919
</div>
2020
</div>
2121

2222
<div className="flex flex-col items-center justify-between gap-5">
23-
<SvgIcon className="h-20 w-20" icon="vite" />
24-
<span className="text-8 text-#BE32F7">Vite 插件</span>
23+
<SvgIcon className="h-20 w-20" icon="unplugin" />
24+
<span className="text-8 text-#BE32F7">通用插件</span>
2525
</div>
2626
</div>
2727

2828
<Link
29-
to="/docs/quick-start"
29+
to="/docs"
3030
className="rounded-2 bg-gray-1 px-10 py-5 text-6 text-gray-8 decoration-none transition-background-color duration-300 hover:bg-gray-2 hover:text-gray-7"
3131
>
3232
快速开始

0 commit comments

Comments
 (0)