This commit is contained in:
alessio 2016-08-23 02:23:17 +02:00
parent 74ab1a1695
commit 84c4383fdf
1 changed files with 13 additions and 10 deletions

View File

@ -59,16 +59,6 @@ func (h *Config) Fast(params *cli.Context) error {
return nil
}
func routines(p *Project, channel chan bool, wr *sync.WaitGroup) {
channel = make(chan bool)
err := p.fmt()
if err == nil {
wr.Add(1)
go p.build()
go p.install(channel, wr)
}
}
// Watching method is the main core. It manages the livereload and the watching
func (p *Project) watching() {
@ -214,6 +204,19 @@ func (p *Project) ignore(str string) bool {
return false
}
// Routines launches the following methods: run, build, fmt, install
func routines(p *Project, channel chan bool, wr *sync.WaitGroup) {
channel = make(chan bool)
err := p.fmt()
if err == nil {
wr.Add(1)
go p.build()
go p.install(channel, wr)
} else {
fmt.Println(Red(err))
}
}
// check if a string is inArray
func inArray(str string, list []string) bool {
for _, v := range list {