From ee3dd8f43619750878cd0856c752cb070ab0687d Mon Sep 17 00:00:00 2001 From: Sergey Lanzman Date: Sat, 25 Feb 2017 22:14:45 +0200 Subject: [PATCH] Update watch.go fix bug with reload static files before: on change static file bee reload web page on change go files bee only reload web page after: on change static file bee reload web page on change go files bee rebuild app without not reload web page. --- watch.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/watch.go b/watch.go index a2f0392..9b1daa4 100644 --- a/watch.go +++ b/watch.go @@ -55,7 +55,7 @@ func NewWatcher(paths []string, files []string, isgenerate bool) { case e := <-watcher.Events: isBuild := true - if ifStaticFile(e.Name) || conf.EnableReload { + if ifStaticFile(e.Name) && conf.EnableReload { sendReload(e.String()) continue } @@ -82,10 +82,6 @@ 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 conf.EnableReload { - sendReload(e.String()) - } }() } case err := <-watcher.Errors: