1
0
mirror of https://github.com/beego/bee.git synced 2024-11-22 15:10:54 +00:00

after build the browser is refreshed

This commit is contained in:
TankTheFrank 2017-10-19 13:39:59 +03:00
parent e90da8f77b
commit 7fed44ed28

View File

@ -86,6 +86,12 @@ func NewWatcher(paths []string, files []string, isgenerate bool) {
scheduleTime = time.Now().Add(1 * time.Second) scheduleTime = time.Now().Add(1 * time.Second)
time.Sleep(scheduleTime.Sub(time.Now())) time.Sleep(scheduleTime.Sub(time.Now()))
AutoBuild(files, isgenerate) AutoBuild(files, isgenerate)
if config.Conf.EnableReload {
// Wait 100ms more before refreshing the browser
time.Sleep(100 * time.Millisecond)
sendReload(e.String())
}
}() }()
} }
case err := <-watcher.Errors: case err := <-watcher.Errors: