From c34cb05355c59a8c3692095cd1b50322d52c1a72 Mon Sep 17 00:00:00 2001 From: TankTheFrank Date: Thu, 19 Oct 2017 13:39:59 +0300 Subject: [PATCH] after build the browser is refreshed --- cmd/commands/run/watch.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmd/commands/run/watch.go b/cmd/commands/run/watch.go index 825b7b9..1a3c132 100644 --- a/cmd/commands/run/watch.go +++ b/cmd/commands/run/watch.go @@ -86,6 +86,12 @@ func NewWatcher(paths []string, files []string, isgenerate bool) { scheduleTime = time.Now().Add(1 * time.Second) time.Sleep(scheduleTime.Sub(time.Now())) 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: