docs(帮助文档): 更新并新增帮助文档内容

- 修复create_package.hlp中的格式问题
- 在pkg_download_en.hlp中添加空行提高可读性
- 新增network.hlp网络工具文档
- 新增config.hlp系统配置管理文档
This commit is contained in:
2025-09-03 17:56:26 +08:00
parent b83331a6a8
commit 788ed1f685
4 changed files with 170 additions and 10 deletions

View File

@@ -124,12 +124,12 @@ For more information on publishing, see the documentation for your chosen reposi
Let's create a simple package called "greeting":
1. Create the package:
>>color yellow
>>color yellow
pkg init greeting
>>color white
>>color white
2. Edit package.json:
>>color yellow
>>color yellow
{
"name": "greeting",
"version": "1.0.0",
@@ -141,10 +141,10 @@ Let's create a simple package called "greeting":
"sayHello": "sayHello"
}
}
>>color white
>>color white
3. Edit greeting.lua:
>>color yellow
>>color yellow
-- greeting.lua
local greeting = {}
@@ -154,21 +154,21 @@ Let's create a simple package called "greeting":
end
return greeting
>>color white
>>color white
4. Test the package:
>>color yellow
>>color yellow
-- test_greeting.lua
local greeting = require("greeting")
print(greeting.sayHello("User"))
>>color white
>>color white
Run with: lua test_greeting.lua
5. Install the package:
>>color yellow
>>color yellow
pkg install --local /packages/greeting/1.0.0/
>>color white
>>color white
Now your package is ready to use in other programs!