diff --git a/realize/app.go b/realize/app.go index c6c59f0..a8bf76d 100644 --- a/realize/app.go +++ b/realize/app.go @@ -19,22 +19,31 @@ const ( ) var wg sync.WaitGroup + // Green color bold var Green = color.New(color.FgGreen, color.Bold).SprintFunc() + // Red color bold var Red = color.New(color.FgRed, color.Bold).SprintFunc() + // RedS color used for errors var RedS = color.New(color.FgRed).SprintFunc() + // Blue color bold used for project output var Blue = color.New(color.FgBlue, color.Bold).SprintFunc() + // BlueS color var BlueS = color.New(color.FgBlue).SprintFunc() + // Yellow color bold var Yellow = color.New(color.FgYellow, color.Bold).SprintFunc() + // YellowS color var YellowS = color.New(color.FgYellow).SprintFunc() + // MagentaS color var MagentaS = color.New(color.FgMagenta).SprintFunc() + // Magenta color bold var Magenta = color.New(color.FgMagenta, color.Bold).SprintFunc() diff --git a/realize/watcher.go b/realize/watcher.go index 542f07d..f9d90a7 100644 --- a/realize/watcher.go +++ b/realize/watcher.go @@ -76,9 +76,9 @@ func (p *Project) watching() { walk := func(path string, info os.FileInfo, err error) error { if !p.ignore(path) { - if (info.IsDir() && len(filepath.Ext(path)) == 0 && !strings.HasPrefix(path, ".")) || (inArray(filepath.Ext(path), p.Watcher.Exts)) { + if (info.IsDir() && len(filepath.Ext(path)) == 0 && !strings.HasPrefix(path, ".")) && !strings.Contains(path, "/.") || (inArray(filepath.Ext(path), p.Watcher.Exts)) { if p.Watcher.Preview { - fmt.Println(pname(p.Name, 1) + ": \t" + path) + fmt.Println(pname(p.Name, 1), ":", path) } if err = watcher.Add(path); err != nil { return filepath.SkipDir