mirror of
https://github.com/beego/bee.git
synced 2024-11-22 05:00:54 +00:00
Add support for watch main package files through bee.json
This commit is contained in:
parent
172bc44b22
commit
ead4f9fd81
8
bee.json
8
bee.json
@ -1,5 +1,9 @@
|
||||
{
|
||||
"dir_structure":{
|
||||
"controllers": "routers"
|
||||
}
|
||||
"controllers": "",
|
||||
"models": ""
|
||||
},
|
||||
"files": [
|
||||
"main.go"
|
||||
]
|
||||
}
|
2
run.go
2
run.go
@ -40,6 +40,7 @@ var conf struct {
|
||||
Controllers string
|
||||
Models string
|
||||
} `json:"dir_structure"`
|
||||
Files []string
|
||||
}
|
||||
|
||||
func runApp(cmd *Command, args []string) {
|
||||
@ -58,6 +59,7 @@ func runApp(cmd *Command, args []string) {
|
||||
paths = append(paths,
|
||||
path.Join(crupath, conf.DirStruct.Controllers),
|
||||
path.Join(crupath, conf.DirStruct.Models))
|
||||
paths = append(paths, conf.Files...)
|
||||
|
||||
NewWatcher(paths)
|
||||
appname = args[0]
|
||||
|
Loading…
Reference in New Issue
Block a user