feat(docs): 文档站自带热更新——源码变更自动重建后端+刷新元数据
- docs 后端从 go run 改为 build+spawn(编译成功才切换,与 fun run 同语义) - watchLoop 复用:.go/go.mod/go.sum 变更→重采元数据+重启后端 - 新增 /fun-version 端点;文档页轮询版本变化自动刷新(编辑中推迟) - snapshot 跳过 fun_gen_helper_test.go,避免采集辅助文件自触发 - -from 静态模式不启用;-no-run 仍刷新元数据(后端由外部管理) Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
@@ -135,6 +135,10 @@ func snapshot(root string) map[string]int64 {
|
||||
}
|
||||
ext := filepath.Ext(name)
|
||||
if ext == ".go" || name == "go.mod" || name == "go.sum" {
|
||||
// 元数据采集的临时辅助文件在模块内一闪而过,忽略避免自触发
|
||||
if name == helperTestFile {
|
||||
return nil
|
||||
}
|
||||
if info, err := d.Info(); err == nil {
|
||||
out[path] = info.ModTime().UnixNano()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user