-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathdev.ps1
More file actions
35 lines (31 loc) · 1.38 KB
/
dev.ps1
File metadata and controls
35 lines (31 loc) · 1.38 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
# nmTeam Documentation Management PowerShell Script
# Enable UTF-8 encoding
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
$OutputEncoding = [System.Text.Encoding]::UTF8
param(
[Parameter(Position=0)]
[string]$Command = "",
[Parameter(ValueFromRemainingArguments=$true)]
[string[]]$RemainingArgs
)
Write-Host "nmTeam Documentation Manager" -ForegroundColor Cyan
Write-Host ""
if ($Command -eq "" -or $Command -eq "help") {
Write-Host "用法: .\dev.ps1 <command>" -ForegroundColor Yellow
Write-Host ""
Write-Host "可用命令:" -ForegroundColor Green
Write-Host " dev 启动开发模式 (文件监听 + 热更新)" -ForegroundColor White
Write-Host " build 构建静态站点 (生成文档 + 构建)" -ForegroundColor White
Write-Host " clean 清理生成的文件" -ForegroundColor White
Write-Host " install 安装依赖包" -ForegroundColor White
Write-Host " help 显示帮助信息" -ForegroundColor White
Write-Host ""
Write-Host "示例:" -ForegroundColor Yellow
Write-Host " .\dev.ps1 dev # 启动开发服务器" -ForegroundColor Gray
Write-Host " .\dev.ps1 build # 构建生产版本" -ForegroundColor Gray
Write-Host " .\dev.ps1 clean # 清理临时文件" -ForegroundColor Gray
exit 0
}
# 执行 Python 脚本
$arguments = @($Command) + $RemainingArgs
& python manage.py $arguments