Skip to content

Commit ed1ea6f

Browse files
committed
improve code
1 parent c7a4aec commit ed1ea6f

8 files changed

Lines changed: 36 additions & 29 deletions

File tree

src/.vuepress/sidebar/en.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export const enSidebar = sidebar({
4444
"time",
4545
"math",
4646
"fs",
47-
"assert",
47+
"testify",
4848
"reflect",
4949
"bash",
5050
"powershell",

src/.vuepress/sidebar/zh.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export const zhSidebar = sidebar({
4545
"time",
4646
"math",
4747
"fs",
48-
"assert",
48+
"testify",
4949
"reflect",
5050
"bash",
5151
"powershell",
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Assert
2+
title: Testify
33
icon: fas fa-triangle-exclamation
44
date: 2025-04-19
55
category: lib
@@ -8,7 +8,7 @@ tag:
88
license: MIT
99
---
1010

11-
>Assert 库是一类在编程中广泛用于单元测试的工具库,它的核心功能是提供一组断言(assertions)函数,用于验证程序在特定条件下的行为是否正确。
11+
>Testify 库是一类在编程中广泛用于单元测试的工具库,它的核心功能是提供一组断言(assertions)函数,用于验证程序在特定条件下的行为是否正确。
1212
>当你在编写测试用例时,Assert 库能帮你明确地表达期望值与实际结果之间的关系。如果某个断言失败,测试框架就会报告一个错误,从而提示开发者代码存在潜在问题。
1313
1414
::: important

src/zh/README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,64 +9,64 @@ heroImageStyle:
99
tagline: Hulo 是一门专为批处理设计的编程语言,可编译为 Bash、PowerShell 和 VBS 等原生系统级脚本语言。
1010
actions:
1111
- text: 立即开始
12-
link: ./demo/
12+
link: ./guide/
1313
icon: signs-post
1414
type: primary
1515

1616
- text: 文档
17-
link: ./guide/
17+
link: ./grammar/
1818

1919
highlights:
2020

2121
- header: 为什么选择 Hulo ?
2222
features:
2323
- title: 跨平台
2424
icon: network-wired
25-
details: Compiles to multiple shell languages including Bash, PowerShell, and VBS ...
25+
details: 编译成多种批处理语言,如 Bash, PowerShell, VBS ...
2626
link:
2727

2828
- title: 现代语法
2929
icon: code
30-
details: Clean, expressive syntax similar to modern programming languages, eliminating traditional shell scripting quirks
30+
details: 同现代编程语言类似的易于表达的语法,消除传统 Shell 脚本古怪的特性
3131
link:
3232

3333
- title: 类型安全
3434
icon: circle-info
35-
details: Strong static typing system to catch errors at compile time rather than runtime
35+
details: 强大的静态类型系统,在编译时捕获错误,而不是在运行时捕获错误
3636
link:
3737

3838
- title: 命令提示
3939
icon: comment-dots
40-
details: Intelligent code completion and inline documentation for all commands and APIs
40+
details: 智能代码补全和对命令及API内置文档
4141
link:
4242

4343
- title: 原生支持
4444
icon: puzzle-piece
45-
details: Allows embedding of unsafe native code blocks when direct system access is required
45+
details: 支持嵌入不安全的原生代码块
4646
link:
4747

4848
- title: 安全特性
4949
icon: lock
50-
details: Built-in error handling with try-catch mechanisms and automatic resource cleanup
50+
details: 内置基于 try-catch 的错误处理机制以及自动资源回收
5151
link:
5252

5353
- title: 元编程
5454
icon: diagram-project
55-
details: Advanced metaprogramming capabilities through compile-time code generation and analysis
55+
details: 基于编译时代码生成和分析的高级元编程功能
5656
link:
5757

5858
- header: 工具链
59-
description: Awesome and powerful extensions for Hulo
59+
description: Hulo 的强大扩展
6060
image: /assets/image/box.svg
6161
highlights:
6262
- title: 编译器
6363
icon: fa-tools
64-
details: Hulo Compiler - Transpiles high-level Hulo code into Bash, PowerShell, VBScript, and Batch for seamless cross-platform automation scripting
64+
details: Hulo 编译器 - Transpiles high-level Hulo code into Bash, PowerShell, VBScript, and Batch for seamless cross-platform automation scripting
6565
link: /toolchain/compiler
6666

6767
- title: hlpm
6868
icon: fa-solid fa-cube
69-
details: Hulo Package Manager - Dependency management tool with version resolution and private registry support
69+
details: Hulo 包管理 - 具有解析版本和自建私有仓库能力的依赖管理工具
7070
link: /toolchain/pm
7171

7272
- title: 编辑器插件

src/zh/guide/README.md

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
11
---
22
title: 指南
33
icon: lightbulb
4+
date: 2025-04-13
5+
category: get started
6+
tag: guide
47
---
58

6-
## 功能亮点
9+
```component VPBanner
10+
title: 逐步教程
11+
content: 本教程针对那些不熟悉 Hulo 的小白,如果你已经有相关的经验,请从 <i>语法</i> 开始。
12+
background: url("https://theme-hope-assets.vuejs.press/bg/10-light.svg")
13+
actions:
14+
- text: 查看语法
15+
link: ../grammar/
16+
```
717

8-
### Bar
18+
Welcome to the documentation of Hulo the programming language! 🎉
919

10-
- [baz](bar/baz.md)
11-
- ...
12-
13-
### Foo
14-
15-
- [ray](foo/ray.md)
16-
- ...
20+
Here is a minimal hello world example:
21+
```hulo
22+
echo "Hello World"
23+
```

src/zh/guide/install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Installation
2+
title: 安装
33
icon: download
44
---
55

src/zh/guide/usage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
2-
title: Usage
2+
title: 使用
33
icon: fas fa-rocket
44
---
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Assert
2+
title: Testify
33
icon: fas fa-triangle-exclamation
44
date: 2025-04-19
55
category: lib
@@ -8,7 +8,7 @@ tag:
88
license: MIT
99
---
1010

11-
>Assert 库是一类在编程中广泛用于单元测试的工具库,它的核心功能是提供一组断言(assertions)函数,用于验证程序在特定条件下的行为是否正确。
11+
>Testify 库是一类在编程中广泛用于单元测试的工具库,它的核心功能是提供一组断言(assertions)函数,用于验证程序在特定条件下的行为是否正确。
1212
>当你在编写测试用例时,Assert 库能帮你明确地表达期望值与实际结果之间的关系。如果某个断言失败,测试框架就会报告一个错误,从而提示开发者代码存在潜在问题。
1313
1414
::: important

0 commit comments

Comments
 (0)