create-rue 0.0.7 → 0.0.11
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/bundle.js +3 -3
- package/package.json +14 -17
- package/template/base/app/pages/Home.tsx +136 -55
- package/template/base/app/pages/Report.tsx +192 -0
- package/template/base/app/pages/TodoApp.tsx +464 -0
- package/template/base/app/pages/components/Layout.tsx +186 -32
- package/template/base/app/router.ts +2 -3
- package/template/base/package-lock.json +352 -350
- package/template/base/package.json +7 -7
- package/template/base/pnpm-lock.yaml +51 -51
- package/template/base/style.css +26 -415
- package/template/base/app/pages/Ecosystem.tsx +0 -47
- package/template/base/app/pages/Guide.tsx +0 -49
- package/template/base/app/pages/Packages.tsx +0 -52
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { type FC } from '@rue-js/rue'
|
|
2
|
-
|
|
3
|
-
const steps = [
|
|
4
|
-
'安装 @rue-js/rue、@rue-js/router 与 @rue-js/vite-plugin-rue。',
|
|
5
|
-
'在 vite.config.ts 中注册 rue() 插件。',
|
|
6
|
-
'在 tsconfig.json 中设置 jsx 为 preserve,jsxImportSource 为 @rue-js/rue。',
|
|
7
|
-
'在 app/app.tsx 中创建根组件并通过 useApp 挂载到 #app。',
|
|
8
|
-
]
|
|
9
|
-
|
|
10
|
-
const Guide: FC = () => (
|
|
11
|
-
<div className="page-stack">
|
|
12
|
-
<section className="content-card">
|
|
13
|
-
<p className="section-tag">快速上手</p>
|
|
14
|
-
<h1>独立官网项目的最小接入方式</h1>
|
|
15
|
-
<p>
|
|
16
|
-
这个迁移版本采用真实发布包依赖,避免继续引用 monorepo 中的本地开发路径,能更准确反映外部用户的接入体验。
|
|
17
|
-
</p>
|
|
18
|
-
</section>
|
|
19
|
-
|
|
20
|
-
<section className="content-card">
|
|
21
|
-
<h2>接入步骤</h2>
|
|
22
|
-
<div className="step-list">
|
|
23
|
-
{steps.map((step, index) => (
|
|
24
|
-
<div key={step} className="step-item">
|
|
25
|
-
<span className="step-index">0{index + 1}</span>
|
|
26
|
-
<p>{step}</p>
|
|
27
|
-
</div>
|
|
28
|
-
))}
|
|
29
|
-
</div>
|
|
30
|
-
</section>
|
|
31
|
-
|
|
32
|
-
<section className="content-card">
|
|
33
|
-
<h2>配置示例</h2>
|
|
34
|
-
<pre className="code-block">{`import { defineConfig } from 'vite'
|
|
35
|
-
import VitePluginRue from '@rue-js/vite-plugin-rue'
|
|
36
|
-
|
|
37
|
-
export default defineConfig({
|
|
38
|
-
plugins: [
|
|
39
|
-
VitePluginRue({
|
|
40
|
-
include: ['/app/'],
|
|
41
|
-
debug: true,
|
|
42
|
-
}),
|
|
43
|
-
],
|
|
44
|
-
})`}</pre>
|
|
45
|
-
</section>
|
|
46
|
-
</div>
|
|
47
|
-
)
|
|
48
|
-
|
|
49
|
-
export default Guide
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { type FC } from '@rue-js/rue'
|
|
2
|
-
|
|
3
|
-
const packageRows = [
|
|
4
|
-
{
|
|
5
|
-
name: '@rue-js/rue',
|
|
6
|
-
role: '核心运行时与 TSX API',
|
|
7
|
-
detail: '提供 FC、useApp 以及响应式能力,是官网应用的主入口依赖。',
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
name: '@rue-js/router',
|
|
11
|
-
role: '前端路由',
|
|
12
|
-
detail: '提供 RouterView、RouterLink 与 createRouter,用于承载官网页面切换。',
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
name: '@rue-js/vite-plugin-rue',
|
|
16
|
-
role: 'Vite 集成插件',
|
|
17
|
-
detail: '处理 Rue 的编译接入,让 TSX 在独立 Vite 项目中正常工作。',
|
|
18
|
-
},
|
|
19
|
-
]
|
|
20
|
-
|
|
21
|
-
const Packages: FC = () => (
|
|
22
|
-
<div className="page-stack">
|
|
23
|
-
<section className="content-card">
|
|
24
|
-
<p className="section-tag">Packages</p>
|
|
25
|
-
<h1>当前官网使用的 npm 包</h1>
|
|
26
|
-
<p>现在的站点只保留正式发布包依赖,便于版本管理、构建复现与生产部署。</p>
|
|
27
|
-
</section>
|
|
28
|
-
|
|
29
|
-
<section className="table-card">
|
|
30
|
-
<div className="table-head">
|
|
31
|
-
<span>包名</span>
|
|
32
|
-
<span>职责</span>
|
|
33
|
-
<span>说明</span>
|
|
34
|
-
</div>
|
|
35
|
-
{packageRows.map(row => (
|
|
36
|
-
<div key={row.name} className="table-row">
|
|
37
|
-
<span className="cell-name">{row.name}</span>
|
|
38
|
-
<span>{row.role}</span>
|
|
39
|
-
<span>{row.detail}</span>
|
|
40
|
-
</div>
|
|
41
|
-
))}
|
|
42
|
-
</section>
|
|
43
|
-
|
|
44
|
-
<section className="content-card">
|
|
45
|
-
<h2>安装命令</h2>
|
|
46
|
-
<pre className="code-block">{`npm install @rue-js/rue @rue-js/router
|
|
47
|
-
npm install -D vite typescript @rue-js/vite-plugin-rue`}</pre>
|
|
48
|
-
</section>
|
|
49
|
-
</div>
|
|
50
|
-
)
|
|
51
|
-
|
|
52
|
-
export default Packages
|