Skip to content

Commit

Permalink
Use filter/map in watch task
Browse files Browse the repository at this point in the history
  • Loading branch information
neersighted committed Jan 2, 2016
1 parent 14769a2 commit c83d368
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tgui/gulp/tasks/watch.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@ reload = require "./reload"


module.exports = ->
paths = []
for i,path of p
paths.push "#{path.dir}**" if path.dir

gulp.watch paths, debounce(gulp.series(clean, build, reload), 1000)
gulp.watch(
Object.keys(p).filter((path) -> p[path].dir?).map((path) -> p[path].dir + "**"),
debounce gulp.series(clean, build, reload), 1000
)
module.exports.displayName = "watch"

0 comments on commit c83d368

Please sign in to comment.