mirror of
https://github.com/beego/bee.git
synced 2024-11-25 15:00:55 +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":{
|
"dir_structure":{
|
||||||
"controllers": "routers"
|
"controllers": "",
|
||||||
}
|
"models": ""
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"main.go"
|
||||||
|
]
|
||||||
}
|
}
|
2
run.go
2
run.go
@ -40,6 +40,7 @@ var conf struct {
|
|||||||
Controllers string
|
Controllers string
|
||||||
Models string
|
Models string
|
||||||
} `json:"dir_structure"`
|
} `json:"dir_structure"`
|
||||||
|
Files []string
|
||||||
}
|
}
|
||||||
|
|
||||||
func runApp(cmd *Command, args []string) {
|
func runApp(cmd *Command, args []string) {
|
||||||
@ -58,6 +59,7 @@ func runApp(cmd *Command, args []string) {
|
|||||||
paths = append(paths,
|
paths = append(paths,
|
||||||
path.Join(crupath, conf.DirStruct.Controllers),
|
path.Join(crupath, conf.DirStruct.Controllers),
|
||||||
path.Join(crupath, conf.DirStruct.Models))
|
path.Join(crupath, conf.DirStruct.Models))
|
||||||
|
paths = append(paths, conf.Files...)
|
||||||
|
|
||||||
NewWatcher(paths)
|
NewWatcher(paths)
|
||||||
appname = args[0]
|
appname = args[0]
|
||||||
|
Loading…
Reference in New Issue
Block a user