watcher change event in web panel

This commit is contained in:
alessio 2016-10-17 12:16:27 +02:00
parent 2fd91f3464
commit 37ab7223d5
1 changed files with 2 additions and 0 deletions

View File

@ -63,6 +63,8 @@ func (p *Project) watching() {
i := strings.Index(event.Name, filepath.Ext(event.Name)) i := strings.Index(event.Name, filepath.Ext(event.Name))
if event.Name[:i] != "" && inArray(ext, p.Watcher.Exts) { if event.Name[:i] != "" && inArray(ext, p.Watcher.Exts) {
p.Buffer.StdLog = append(p.Buffer.StdLog, BufferOut{Time: time.Now(), Text: event.Name[:i] + ext + " changed"})
p.parent.Sync <- "sync"
fmt.Println(pname(p.Name, 4), Magenta(strings.ToUpper(ext[1:])+" changed"), Magenta(event.Name[:i]+ext)) fmt.Println(pname(p.Name, 4), Magenta(strings.ToUpper(ext[1:])+" changed"), Magenta(event.Name[:i]+ext))
// stop and run again // stop and run again
if p.Run { if p.Run {