create-rue 0.0.8 → 0.0.14

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.
@@ -1,47 +0,0 @@
1
- import { type FC } from '@rue-js/rue'
2
-
3
- const ecosystemItems = [
4
- {
5
- title: '官网入口',
6
- desc: '用最小 Rue 应用结构承载内容页面,便于继续往文档站或产品站扩展。',
7
- },
8
- {
9
- title: '路由层',
10
- desc: '通过 hash history 直接适配静态站点部署,不要求服务端额外做重写配置。',
11
- },
12
- {
13
- title: '构建层',
14
- desc: '依赖 Vite 与官方插件完成编译,生产构建方式和外部用户保持一致。',
15
- },
16
- ]
17
-
18
- const Ecosystem: FC = () => (
19
- <div className="page-stack">
20
- <section className="content-card">
21
- <p className="section-tag">生态能力</p>
22
- <h1>从应用迁移到官网的结构拆分</h1>
23
- <p>迁移后的站点把入口、路由、布局和内容页解耦,后续扩展成完整官网时会更容易维护。</p>
24
- </section>
25
-
26
- <section className="grid-cards">
27
- {ecosystemItems.map(item => (
28
- <article key={item.title} className="info-card">
29
- <h2>{item.title}</h2>
30
- <p>{item.desc}</p>
31
- </article>
32
- ))}
33
- </section>
34
-
35
- <section className="content-card">
36
- <h2>适合继续扩展的方向</h2>
37
- <ul className="bullet-list">
38
- <li>补充文档页与 API 页</li>
39
- <li>接入组件示例与代码演示</li>
40
- <li>增加下载、版本、生态导航</li>
41
- <li>对接真实官网视觉资源</li>
42
- </ul>
43
- </section>
44
- </div>
45
- )
46
-
47
- export default Ecosystem
@@ -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