-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvery.html
More file actions
508 lines (486 loc) · 30.8 KB
/
Copy pathvery.html
File metadata and controls
508 lines (486 loc) · 30.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<title>Very - Vix 包管理器</title>
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta name="description" content="Vix 语言的官方包管理器与项目管理工具。依托 Git 仓库进行包管理,简洁高效的命令语法。">
<link rel="stylesheet" href="assets/site.css">
<script src="assets/site.js" defer></script>
</head>
<body class="page-very">
<div id="progress-bar"></div>
<div class="container">
<nav>
<a href="index.html" class="brand">
<img src="logo.png" alt="Vix Lang Logo">
</a>
<button class="nav-toggle" type="button" aria-label="打开导航菜单" aria-expanded="false" aria-controls="site-nav-links">
<span></span>
<span></span>
<span></span>
</button>
<div class="nav-right" id="site-nav-links">
<ul class="nav-links">
<li><a href="index.html" data-i18n="nav_home">首页</a></li>
<li><a href="/VixDocs/" data-i18n="nav_doc">文档</a></li>
<li><a href="very.html" class="active">Very</a></li>
<li><a href="playground/" data-i18n="nav_playground">Playground</a></li>
<li><a href="https://vixlang.github.io/VEP/">VEP</a></li>
<li><a href="https://github.com/vixlang/Vix-lang">GitHub</a></li>
</ul>
<div class="lang-switch">
<button id="btn-zh" type="button" data-lang="zh" class="active" aria-pressed="true">中文</button>
<button id="btn-en" type="button" data-lang="en" aria-pressed="false">EN</button>
</div>
</div>
</nav>
</div>
<div class="container">
<header class="hero">
<div class="hero-inner">
<div class="hero-main">
<p class="hero-sub hero-line hero-line-1" data-i18n="hero_sub">Vix 语言官方工具</p>
<h1 class="hero-line hero-line-2" data-i18n="title">Very</h1>
<p class="hero-desc hero-line hero-line-3" data-i18n="desc">Vix语言包管理器兼项目管理工具</p>
<div class="hero-actions hero-line hero-line-4">
<a href="https://github.com/vixlang/Very" class="btn btn-primary" data-i18n="start">GitHub 仓库</a>
<a href="#install" class="btn btn-secondary" data-i18n="install">安装 Very</a>
</div>
</div>
<div class="hero-code hero-line hero-line-5">
<div class="code-sample">
<pre><code><span class="code-comment"># Very 命令帮助</span>
<span class="code-title">very</span> --help
<span class="code-title">very</span> add fexcode.vnet
<span class="code-title">very</span> init my-project
<span class="code-title">very</span> search vnet
<span class="code-title">very</span> list --tree
<span class="code-title">very</span> tool add game
<span class="code-title">very</span> tool search game</code></pre>
</div>
</div>
</div>
</header>
</div>
<section class="section section-green reveal">
<div class="container">
<h2 data-i18n="overview_title">概述</h2>
<div class="highlight-bar"></div>
<p class="section-intro" data-i18n="overview_desc">
Very 是 Vix 编程语言的官方项目管理与构建工具。它依托 Git 仓库进行包管理,提供简洁高效的命令语法,支持包依赖管理、工具链管理和项目初始化。
</p>
<div class="overview-grid reveal-grid">
<div class="overview-card">
<h3 data-i18n="f1_t">Git 原生集成</h3>
<p data-i18n="f1_d">直接基于 Git 仓库管理依赖,无需中心化包注册服务器。支持 GitHub、Gitee 等主流 Git 平台,灵活指定分支和版本。</p>
</div>
<div class="overview-card">
<h3 data-i18n="f2_t">简洁的简写语法</h3>
<p data-i18n="f2_d">内置智能包名展开规则:<code>fexcode.vnet</code> 自动映射为 <code>github.com/fexcode/vnet</code>,<code>@</code> 前缀默认指向 Gitee,省去繁琐的完整 URL 输入。</p>
</div>
<div class="overview-card">
<h3 data-i18n="f3_t">包与工具双管理</h3>
<p data-i18n="f3_d">统一管理项目依赖(<code>vlib-*</code>)和可执行工具(<code>vtool-*</code>)。工具自动编译为原生可执行文件,支持增量更新和自动安装。</p>
</div>
</div>
</div>
</section>
<section class="section reveal">
<div class="container">
<h2 data-i18n="cmd_title">Very 实战</h2>
<div class="highlight-bar"></div>
<p class="demo-intro" data-i18n="cmd_desc">
点击场景,看看 Very 如何把繁琐的 Git 操作简化成一行命令。
</p>
<div class="demo-scenarios">
<button class="demo-scenario active" data-demo="add">添加包</button>
<button class="demo-scenario" data-demo="init">创建项目</button>
<button class="demo-scenario" data-demo="search">搜索包</button>
<button class="demo-scenario" data-demo="tool">安装工具</button>
</div>
<div class="demo-stage" id="demoStage">
<div class="demo-panel before-panel">
<div class="demo-panel-label"><span class="demo-icon">✕</span> <span data-i18n="demo_before">传统方式</span></div>
<pre class="demo-cmd" id="demoBefore">git clone <span class="faint">https://</span>github.com/fexcode/vnet.git</pre>
</div>
<div class="demo-arrow-wrap">
<div class="demo-savings" id="demoSavings">-85%</div>
<div class="demo-arrow">↓</div>
</div>
<div class="demo-panel after-panel">
<div class="demo-panel-label"><span class="demo-icon">✓</span> <span data-i18n="demo_after">Very 一行</span></div>
<pre class="demo-cmd" id="demoAfter"><span class="highlight">very add</span> fexcode.vnet</pre>
</div>
</div>
<div class="demo-detail" id="demoDetail"></div>
</div>
</section>
<section class="section section-purple reveal">
<div class="container">
<h2 data-i18n="shorthand_title">包名缩写规则</h2>
<div class="highlight-bar"></div>
<p class="shorthand-intro" data-i18n="shorthand_desc">
Very 提供了一套极具创意且高效的包名缩写系统。无需输入完整 Git URL,只需记住几条简单规则,即可用最少的字符定位任意仓库。
</p>
<div class="shorthand-grid reveal-grid">
<div class="shorthand-card">
<span class="shorthand-label" data-i18n="s_label_base">基本规则</span>
<div class="arrow-row">
<span class="input">user.repo</span>
<span class="arrow">→</span>
<span class="output">github.com/user/repo</span>
</div>
<p class="shorthand-note" data-i18n="s_base_note">以 <code>.</code> 分隔用户名和仓库名,默认托管在 GitHub。这是最常用的写法。</p>
</div>
<div class="shorthand-card">
<span class="shorthand-label" data-i18n="s_label_branch">指定分支</span>
<div class="arrow-row">
<span class="input">user.repo@branch</span>
<span class="arrow">→</span>
<span class="output">github.com/user/repo @ branch</span>
</div>
<p class="shorthand-note" data-i18n="s_branch_note">在包名后追加 <code>@分支名</code> 即可锁定特定分支,默认跟踪 <code>main</code> 或 <code>master</code>。</p>
</div>
<div class="shorthand-card">
<span class="shorthand-label" data-i18n="s_label_platform">指定平台</span>
<div class="arrow-row">
<span class="input">gitee.com:user.repo</span>
<span class="arrow">→</span>
<span class="output">gitee.com/user/repo</span>
</div>
<p class="shorthand-note" data-i18n="s_platform_note">用 <code>域名:</code> 前缀显式指定 Git 托管平台,Very 自动将 <code>:</code> 转换为 <code>/</code>。</p>
</div>
<div class="shorthand-card">
<span class="shorthand-label" data-i18n="s_label_platform_sh">平台简写</span>
<div class="arrow-row">
<span class="input">gitee:user.repo</span>
<span class="arrow">→</span>
<span class="output">gitee.com/user/repo</span>
</div>
<p class="shorthand-note" data-i18n="s_platform_sh_note"><code>.com</code> 后缀可省略。Very 自动补全常见顶级域名,输入更快捷。</p>
</div>
<div class="shorthand-card">
<span class="shorthand-label" data-i18n="s_label_gitee">Gitee 快捷符</span>
<div class="arrow-row">
<span class="input">@user.repo</span>
<span class="arrow">→</span>
<span class="output">gitee.com/user/repo</span>
</div>
<p class="shorthand-note" data-i18n="s_gitee_note"><code>@</code> 前缀是 Gitee 的快捷入口——一个字符切换平台,对国内开发者尤为友好。</p>
</div>
<div class="shorthand-card">
<span class="shorthand-label" data-i18n="s_label_bare">裸名称 — 官方包</span>
<div class="arrow-row">
<span class="input">vnet</span>
<span class="arrow">→</span>
<span class="output">github.com/vixlang/vlib-vnet</span>
</div>
<p class="shorthand-note" data-i18n="s_bare_note">不含 <code>.</code> 的单个词为"裸名称"。Very 自动匹配官方仓库,库前缀 <code>vlib-</code>,工具前缀 <code>vtool-</code>。</p>
</div>
</div>
<div class="shorthand-tip" data-i18n="shorthand_tip">
<strong>创意组合:</strong> 以上规则可自由组合。例如 <code>@user.repo@dev</code> 表示 Gitee 上 user/repo 的 dev 分支;
<code>gitee:user.repo@master</code> 是完整显式写法。Very 的解析器按 <code>平台 → 用户 → 仓库 → 分支</code> 的顺序智能解构,让你用最少的按键表达最精确的意图。
</div>
</div>
</section>
<section class="section section-purple reveal" id="install">
<div class="container">
<h2 data-i18n="install_title">安装 Very</h2>
<div class="highlight-bar"></div>
<p class="section-intro" data-i18n="install_desc">
Very 使用 Python 开发,通过 uv 工具即可快速安装。
</p>
<div class="install-steps">
<div class="install-step">
<div class="install-step-num">1</div>
<div class="install-step-content">
<p data-i18n="install_step1">确保已安装 Python 和 uv 包管理器</p>
<div class="code-sample">
<pre><code><span class="code-comment"># 安装 uv(如未安装)</span>
pip install uv
</code></pre>
</div>
</div>
</div>
<div class="install-step">
<div class="install-step-num">2</div>
<div class="install-step-content">
<p data-i18n="install_step2">克隆 Very 仓库并安装</p>
<div class="code-sample">
<pre><code>git clone https://github.com/vixlang/Very.git
cd Very
uv tool install .
</code></pre>
</div>
</div>
</div>
<div class="install-step">
<div class="install-step-num">3</div>
<div class="install-step-content">
<p data-i18n="install_step3">验证安装</p>
<div class="code-sample">
<pre><code>very --version
very --help
</code></pre>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="section reveal">
<div class="container">
<h2 data-i18n="config_title">项目配置</h2>
<div class="highlight-bar"></div>
<p class="section-intro" data-i18n="config_desc">
每个 Vix 项目通过 <code>vindex.toml</code> 文件描述元数据、依赖关系和构建配置。
</p>
<div class="config-grid reveal-grid">
<div class="config-card">
<h3 data-i18n="config_vindex">vindex.toml</h3>
<p data-i18n="config_vindex_desc">项目配置文件,定义项目名称、版本、作者、依赖和构建选项。Very 通过此文件识别和管理项目。</p>
<a href="https://github.com/vixlang/Very/blob/main/docs/vindex-toml.md" class="btn btn-secondary" data-i18n="config_vindex_btn">查看配置文档</a>
</div>
<div class="config-card">
<h3 data-i18n="config_init">项目结构</h3>
<p data-i18n="config_init_desc">使用 <code>very init</code> 创建的标准项目骨架,包含入口文件、配置文件和 gitignore。</p>
<div class="dir-tree">
<span class="dir">my-project/</span><br>
<span class="tree-comment">├──</span> <span class="file">vindex.toml</span> <span class="tree-comment"># 项目配置</span><br>
<span class="tree-comment">├──</span> <span class="file">main.vix</span> <span class="tree-comment"># 入口文件</span><br>
<span class="tree-comment">├──</span> <span class="file">.gitignore</span><br>
<span class="tree-comment">└──</span> <span class="file">README.md</span>
</div>
</div>
</div>
</div>
</section>
<section class="section section-orange-bg reveal">
<div class="container cta-centered">
<h2 data-i18n="eco_title">加入 Vix 生态</h2>
<p class="cta-copy" data-i18n="eco_desc">
Very 正在持续迭代中,欢迎开发者贡献包和工具,共同构建 Vix 语言生态。
</p>
<div class="hero-actions cta-actions">
<a href="https://github.com/vixlang/Very" class="btn btn-secondary" data-i18n="eco_github">Very 源码</a>
<a href="https://github.com/vixlang" class="btn btn-secondary" data-i18n="eco_org">vixlang 组织</a>
<a href="index.html" class="btn btn-secondary" data-i18n="eco_home">返回 Vix 官网</a>
</div>
</div>
</section>
<footer class="reveal">
<div class="container">
<div class="footer-grid">
<div class="footer-col">
<h4>相关资源</h4>
<ul>
<li><a href="https://github.com/vixlang/Very">Very 源码</a></li>
<li><a href="https://github.com/vixlang/Very/blob/main/docs/vindex-toml.md">vindex.toml 文档</a></li>
<li><a href="https://github.com/vixlang">vixlang 组织</a></li>
</ul>
</div>
<div class="footer-col">
<h4>条款与政策</h4>
<ul>
<li><a href="https://github.com/vixlang/Vix-lang/blob/stage0/LICENSE">许可证</a></li>
<li><a href="#">行为准则</a></li>
</ul>
</div>
<div class="footer-col">
<h4>社交</h4>
<div class="social-row">
<a href="https://github.com/vixlang" target="_blank">GitHub</a>
<a href="mailto:popolk1871@outlook.com">Contact Us</a>
</div>
<p class="footer-note">QQ 群: 130577506</p>
</div>
</div>
<div class="attribution">
<p>由 Vix Lang 贡献者维护 | MIT 协议</p>
<p>发现了错别字?<a href="https://github.com/vixlang/vixlang.github.io/issues">在这里提交修复!</a></p>
</div>
</div>
</footer>
<script>
const translations = {
zh: {
title: "Very",
desc: "Vix语言包管理器兼项目管理工具",
start: "GitHub 仓库",
install: "安装 Very",
nav_home: "首页", nav_doc: "文档", nav_vep: "VEP",
nav_playground: "在线运行",
hero_sub: "Vix 语言官方工具",
overview_title: "概述",
overview_desc: "Very 是 Vix 编程语言的官方项目管理与构建工具。它依托 Git 仓库进行包管理,提供简洁高效的命令语法,支持包依赖管理、工具链管理和项目初始化。",
f1_t: "Git 原生集成",
f1_d: "直接基于 Git 仓库管理依赖,无需中心化包注册服务器。支持 GitHub、Gitee 等主流 Git 平台,灵活指定分支和版本。",
f2_t: "简洁的简写语法",
f2_d: "内置智能包名展开规则:fexcode.vnet 自动映射为 github.com/fexcode/vnet,@ 前缀默认指向 Gitee,省去繁琐的完整 URL 输入。",
f3_t: "包与工具双管理",
f3_d: "统一管理项目依赖(vlib-*)和可执行工具(vtool-*)。工具自动编译为原生可执行文件,支持增量更新和自动安装。",
shorthand_title: "包名缩写规则",
shorthand_desc: "Very 提供了一套极具创意且高效的包名缩写系统。无需输入完整 Git URL,只需记住几条简单规则,即可用最少的字符定位任意仓库。",
s_label_base: "基本规则",
s_base_note: "以 . 分隔用户名和仓库名,默认托管在 GitHub。这是最常用的写法。",
s_label_branch: "指定分支",
s_branch_note: "在包名后追加 @分支名 即可锁定特定分支,默认跟踪 main 或 master。",
s_label_platform: "指定平台",
s_platform_note: "用 域名: 前缀显式指定 Git 托管平台,Very 自动将 : 转换为 /。",
s_label_platform_sh: "平台简写",
s_platform_sh_note: ".com 后缀可省略。Very 自动补全常见顶级域名,输入更快捷。",
s_label_gitee: "Gitee 快捷符",
s_gitee_note: "@ 前缀是 Gitee 的快捷入口——一个字符切换平台,对国内开发者尤为友好。",
s_label_bare: "裸名称 — 官方包",
s_bare_note: "不含 . 的单个词为「裸名称」。Very 自动匹配官方仓库,库前缀 vlib-,工具前缀 vtool-。",
shorthand_tip: "创意组合: 以上规则可自由组合。例如 @user.repo@dev 表示 Gitee 上 user/repo 的 dev 分支;gitee:user.repo@master 是完整显式写法。Very 的解析器按 平台 → 用户 → 仓库 → 分支 的顺序智能解构,让你用最少的按键表达最精确的意图。",
cmd_title: "Very 实战",
cmd_desc: "点击场景,看看 Very 如何把繁琐的 Git 操作简化成一行命令。",
demo_before: "传统方式",
demo_after: "Very 一行",
demo_add_title: "添加 Vix 包",
demo_add_desc: "从 Git 仓库安装依赖,自动解析 user.repo 为完整 URL。一行搞定 clone 和注册。",
demo_init_title: "创建 Vix 项目",
demo_init_desc: "一键生成标准项目骨架,包含入口文件、配置文件和 .gitignore。省去手动 mkdir 和 touch。",
demo_search_title: "搜索可用包",
demo_search_desc: "从 GitHub vixlang 组织搜索包,支持按星标、更新时间排序。告别 curl 和 grep。",
demo_tool_title: "安装 Vix 工具",
demo_tool_desc: "安装可执行工具,裸名称自动使用 vtool- 前缀并编译为原生二进制文件。",
install_title: "安装 Very",
install_desc: "Very 使用 Python 开发,通过 uv 工具即可快速安装。",
install_step1: "确保已安装 Python 和 uv 包管理器",
install_step2: "克隆 Very 仓库并安装",
install_step3: "验证安装",
config_title: "项目配置",
config_desc: "每个 Vix 项目通过 vindex.toml 文件描述元数据、依赖关系和构建配置。",
config_vindex: "vindex.toml",
config_vindex_desc: "项目配置文件,定义项目名称、版本、作者、依赖和构建选项。Very 通过此文件识别和管理项目。",
config_vindex_btn: "查看配置文档",
config_init: "项目结构",
config_init_desc: "使用 very init 创建的标准项目骨架,包含入口文件、配置文件和 gitignore。",
eco_title: "加入 Vix 生态",
eco_desc: "Very 正在持续迭代中,欢迎开发者贡献包和工具,共同构建 Vix 语言生态。",
eco_github: "Very 源码",
eco_org: "vixlang 组织",
eco_home: "返回 Vix 官网"
},
en: {
title: "Very",
desc: "Vix Language Package Manager & Project Management Tool",
start: "GitHub Repo",
install: "Install Very",
nav_home: "Home", nav_doc: "Docs", nav_vep: "VEP",
nav_playground: "Playground",
hero_sub: "Official Vix Tool",
overview_title: "Overview",
overview_desc: "Very is the official package manager and project management tool for the Vix programming language. It leverages Git repositories for package management with clean, efficient command syntax.",
f1_t: "Native Git Integration",
f1_d: "Manage dependencies directly via Git repositories — no centralized registry needed. Supports GitHub, Gitee, and other major Git platforms with flexible branch and version selection.",
f2_t: "Smart Shorthand Syntax",
f2_d: "Built-in package name expansion: fexcode.vnet auto-maps to github.com/fexcode/vnet, @ prefix defaults to Gitee. No more typing full URLs.",
f3_t: "Packages & Tools Management",
f3_d: "Unified management for project dependencies (vlib-*) and executable tools (vtool-*). Tools auto-compile to native binaries with incremental updates.",
shorthand_title: "Package Name Shorthand Rules",
shorthand_desc: "Very provides a creative and efficient package name abbreviation system. No need to type full Git URLs — just remember a few simple rules to pinpoint any repository with minimal keystrokes.",
s_label_base: "Basic Rule",
s_base_note: "Separate user and repo name with ., defaults to GitHub. This is the most common pattern.",
s_label_branch: "Branch Specifier",
s_branch_note: "Append @branchname to pin a specific branch. Defaults to main or master.",
s_label_platform: "Platform Prefix",
s_platform_note: "Use domain: prefix to explicitly specify the Git hosting platform. Very converts : to / automatically.",
s_label_platform_sh: "Platform Shorthand",
s_platform_sh_note: "The .com suffix can be omitted. Very auto-completes common TLDs for faster input.",
s_label_gitee: "Gitee Shortcut",
s_gitee_note: "The @ prefix is a one-character shortcut for Gitee — particularly friendly for Chinese developers.",
s_label_bare: "Bare Name — Official Packages",
s_bare_note: "A single word without . is a bare name. Very auto-maps to official repos: vlib- prefix for libraries, vtool- prefix for tools.",
shorthand_tip: "Creative Combinations: Rules can be mixed freely. For example @user.repo@dev targets the dev branch on Gitee; gitee:user.repo@master is the full explicit form. Very's parser decomposes names in platform → user → repo → branch order, letting you express precise intent with minimal keystrokes.",
cmd_title: "Very in Action",
cmd_desc: "Click a scenario to see how Very simplifies tedious Git operations into one-liners.",
demo_before: "Traditional Way",
demo_after: "Very One-Liner",
demo_add_title: "Add a Package",
demo_add_desc: "Install dependencies from Git repos. Auto-resolves user.repo to full URL. One line for clone + register.",
demo_init_title: "Create a Project",
demo_init_desc: "Generate a standard project skeleton with entry file, config, and .gitignore in one command.",
demo_search_title: "Search Packages",
demo_search_desc: "Search the GitHub vixlang org for packages, sort by stars or last updated. No more curl and grep.",
demo_tool_title: "Install a Tool",
demo_tool_desc: "Install executable tools. Bare names auto-use vtool- prefix and compile to native binaries.",
install_title: "Installation",
install_desc: "Very is built with Python and can be installed quickly via the uv tool.",
install_step1: "Ensure Python and uv are installed",
install_step2: "Clone the Very repository and install",
install_step3: "Verify the installation",
config_title: "Project Configuration",
config_desc: "Every Vix project uses vindex.toml to describe metadata, dependencies, and build configuration.",
config_vindex: "vindex.toml",
config_vindex_desc: "Project configuration file defining name, version, author, dependencies, and build options. Very uses this to identify and manage projects.",
config_vindex_btn: "View Config Docs",
config_init: "Project Structure",
config_init_desc: "The standard project skeleton created by very init, including entry point, config, and gitignore.",
eco_title: "Join the Vix Ecosystem",
eco_desc: "Very is actively evolving. Contributions of packages and tools are welcome to grow the Vix ecosystem.",
eco_github: "Very Source",
eco_org: "vixlang Org",
eco_home: "Back to Vix Home"
}
};
// Demo scenario switching
const demos = {
add: {
before: '<span class="bash-cmd">git clone</span> <span class="bash-str">https://github.com/fexcode/vnet.git</span>',
after: '<span class="highlight">very add</span> fexcode.vnet',
savings: '-85%',
detailKey: 'demo_add'
},
init: {
before: '<span class="bash-cmd">mkdir</span> my-project <span class="bash-op">&&</span> <span class="bash-cmd">cd</span> my-project <span class="bash-op">&&</span> <span class="bash-cmd">touch</span> <span class="bash-str">main.vix vindex.toml .gitignore README.md</span>',
after: '<span class="highlight">very init</span> my-project',
savings: '-90%',
detailKey: 'demo_init'
},
search: {
before: '<span class="bash-cmd">curl</span> <span class="bash-str">https://api.github.com/orgs/vixlang/repos</span> <span class="bash-op">|</span> <span class="bash-cmd">grep</span> <span class="bash-opt">-i</span> <span class="bash-str">vnet</span>',
after: '<span class="highlight">very search</span> vnet',
savings: '-92%',
detailKey: 'demo_search'
},
tool: {
before: '<span class="bash-cmd">git clone</span> <span class="bash-str">https://github.com/vixlang/vtool-game.git</span> <span class="bash-op">&&</span> <span class="bash-cmd">cd</span> <span class="bash-str">vtool-game</span> <span class="bash-op">&&</span> <span class="bash-cmd">very build</span>',
after: '<span class="highlight">very tool add</span> game',
savings: '-88%',
detailKey: 'demo_tool'
}
};
const demoBefore = document.getElementById('demoBefore');
const demoAfter = document.getElementById('demoAfter');
const demoSavings = document.getElementById('demoSavings');
const demoDetail = document.getElementById('demoDetail');
function switchDemo(key) {
const d = demos[key];
demoBefore.innerHTML = d.before;
demoAfter.innerHTML = d.after;
demoSavings.textContent = d.savings;
const lang = document.documentElement.lang === 'en' ? 'en' : 'zh';
const t = translations[lang];
demoDetail.innerHTML = '<strong>' + t[d.detailKey + '_title'] + '</strong><br>' + t[d.detailKey + '_desc'];
document.querySelectorAll('.demo-panel').forEach(p => {
p.style.animation = 'none';
void p.offsetHeight;
p.style.animation = 'panelFade 0.35s ease both';
});
}
document.querySelectorAll('.demo-scenario').forEach(btn => {
btn.addEventListener('click', function() {
document.querySelectorAll('.demo-scenario').forEach(b => b.classList.remove('active'));
this.classList.add('active');
switchDemo(this.dataset.demo);
});
});
switchDemo('add');
</script>
</body>
</html>