File tree 1 file changed +15
-1
lines changed
1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -278,7 +278,7 @@ func main() {
278
278
fmt .Println (cs .Blue (logPrefix ).Green ("Compiled " ).Cyan ("\" " + basePath + "\" " ).Green (" to " ).Cyan ("\" " + outPath + "\" " ).String ())
279
279
280
280
if * serveFlag {
281
- go watcher .StartWatching ()
281
+ watcher .StartWatching ()
282
282
runServer (* portFlag )
283
283
}
284
284
@@ -835,6 +835,7 @@ func _clientNotifyReload() {
835
835
for ind := range reloadCh {
836
836
reloadCh [ind ] <- true
837
837
}
838
+ reloadCh = []chan bool {}
838
839
}
839
840
840
841
func normalizeFilePath (path string ) string {
@@ -891,18 +892,31 @@ func (w *Watcher) AddDir(dirPath string) {
891
892
}
892
893
893
894
func (w * Watcher ) RebuildAlvu () {
895
+ onDebug (func () {
896
+ debugInfo ("Rebuild Started" )
897
+ })
894
898
w .alvu .CopyPublic ()
895
899
w .alvu .Build ()
900
+ onDebug (func () {
901
+ debugInfo ("Build Completed" )
902
+ })
896
903
}
897
904
898
905
func (w * Watcher ) RebuildFile (filePath string ) {
906
+ onDebug (func () {
907
+ debugInfo ("RebuildFile Started" )
908
+ })
899
909
for i , af := range w .alvu .files {
900
910
if af .sourcePath != filePath {
901
911
continue
902
912
}
903
913
904
914
w .alvu .files [i ].Build ()
915
+ break
905
916
}
917
+ onDebug (func () {
918
+ debugInfo ("RebuildFile Completed" )
919
+ })
906
920
}
907
921
908
922
func (w * Watcher ) StartWatching () {
You can’t perform that action at this time.
0 commit comments