go-godo / godo

golang build tool in the spirt of rake, gulp
MIT License
536 stars 31 forks source link

Add outdated option #26

Open mgutz opened 9 years ago

mgutz commented 9 years ago

There should be a way to compare source files against destination files and build if the source is newer like make. Something like this

p.Task("stylesheets", func() {
    Run("sass src ...")
}).Outdated("src/**/*.scss", "dist/**/*.css")

The advantage of doing this is "stylesheets" can be skipped if sass files have not changed. Moreover, the task can be auto-watched using the source glob.