mirror of
https://github.com/beego/bee.git
synced 2024-11-24 23:30:55 +00:00
Merge pull request #483 from TankTheFrank/feature/refresh-browser-on-build
Refresh browser page after binary builds
This commit is contained in:
commit
b94b47d7d5
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user