diff --git a/bee.json b/bee.json index 7422de8..0c0ee71 100644 --- a/bee.json +++ b/bee.json @@ -7,19 +7,11 @@ "go_install": false, "watch_ext": [], "dir_structure": { + "watch_all": false, "controllers": "", "models": "", "others": [] }, "cmd_args": [], - "envs": [], - "bale": { - "import": "github.com/beego/beeweb/bale", - "dirs": [ - "views", "static" - ], - "ignore_ext": [ - ".go", ".DS_Store" - ] - } + "envs": [] } \ No newline at end of file diff --git a/conf.go b/conf.go index e78dc41..0561c0d 100644 --- a/conf.go +++ b/conf.go @@ -29,11 +29,14 @@ var defaultConf = `{ }, "go_install": false, "watch_ext": [], - "dir_structure":{ + "dir_structure": { + "watch_all": false, "controllers": "", "models": "", "others": [] - } + }, + "cmd_args": [], + "envs": [] } ` var conf struct { @@ -47,6 +50,7 @@ var conf struct { GoInstall bool `json:"go_install"` WatchExt []string `json:"watch_ext"` DirStruct struct { + WatchAll bool `json:"watch_all"` Controllers string Models string Others []string // Other directories. diff --git a/run.go b/run.go index 682c78c..2ef319b 100644 --- a/run.go +++ b/run.go @@ -69,7 +69,7 @@ func runApp(cmd *Command, args []string) { var paths []string - if len(args) > 0 && args[len(args)-1] == "watchall" { + if conf.DirStruct.WatchAll || (len(args) > 0 && args[len(args)-1] == "watchall") { readAppDirectories(crupath, &paths) } else { paths = append(paths,