1
0
mirror of https://github.com/beego/bee.git synced 2024-11-21 23:50:54 +00:00

Merge pull request #530 from Medicean/master

fix bee.json & Beefile watch_ext doesn't work
This commit is contained in:
astaxie 2018-07-21 22:28:38 +08:00 committed by GitHub
commit ecd8896cf3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 5 deletions

View File

@ -1,6 +1,7 @@
version: 0 version: 0
go_install: false go_install: false
watch_ext: [] watch_ext: [".go"]
watch_ext_static: [".html", ".tpl", ".js", ".css"]
dir_structure: dir_structure:
watch_all: false watch_all: false
controllers: "" controllers: ""

View File

@ -1,7 +1,8 @@
{ {
"version": 0, "version": 0,
"go_install": false, "go_install": false,
"watch_ext": [], "watch_ext": [".go"],
"watch_ext_static": [".html", ".tpl", ".js", ".css"],
"dir_structure": { "dir_structure": {
"watch_all": false, "watch_all": false,
"controllers": "", "controllers": "",

View File

@ -36,8 +36,8 @@ var (
state sync.Mutex state sync.Mutex
eventTime = make(map[string]int64) eventTime = make(map[string]int64)
scheduleTime time.Time scheduleTime time.Time
watchExts = []string{".go"} watchExts = config.Conf.WatchExts
watchExtsStatic = []string{".html", ".tpl", ".js", ".css"} watchExtsStatic = config.Conf.WatchExtsStatic
ignoredFilesRegExps = []string{ ignoredFilesRegExps = []string{
`.#(\w+).go`, `.#(\w+).go`,
`.(\w+).go.swp`, `.(\w+).go.swp`,

View File

@ -27,6 +27,8 @@ const confVer = 0
var Conf = struct { var Conf = struct {
Version int Version int
WatchExts []string `json:"watch_ext" yaml:"watch_ext"`
WatchExtsStatic []string `json:"watch_ext_static" yaml:"watch_ext_static"`
GoInstall bool `json:"go_install" yaml:"go_install"` // Indicates whether execute "go install" before "go build". GoInstall bool `json:"go_install" yaml:"go_install"` // Indicates whether execute "go install" before "go build".
DirStruct dirStruct `json:"dir_structure" yaml:"dir_structure"` DirStruct dirStruct `json:"dir_structure" yaml:"dir_structure"`
CmdArgs []string `json:"cmd_args" yaml:"cmd_args"` CmdArgs []string `json:"cmd_args" yaml:"cmd_args"`
@ -37,6 +39,8 @@ var Conf = struct {
EnableNotification bool `json:"enable_notification" yaml:"enable_notification"` EnableNotification bool `json:"enable_notification" yaml:"enable_notification"`
Scripts map[string]string `json:"scripts" yaml:"scripts"` Scripts map[string]string `json:"scripts" yaml:"scripts"`
}{ }{
WatchExts: []string{".go"},
WatchExtsStatic: []string{".html", ".tpl", ".js", ".css"},
GoInstall: true, GoInstall: true,
DirStruct: dirStruct{ DirStruct: dirStruct{
Others: []string{}, Others: []string{},