werkzeug
Version:
compiles ts, coffee, sass/scss, less/ stylus and packs browser ready bundles
50 lines (34 loc) • 920 B
text/coffeescript
Walk = require 'walkdir'
EMap = require 'emap'
Log = require './utils/log'
SW = require './utils/stopwatch'
options =
follow_symlinks: true
no_recurse: false
max_depth: 50
class Walker
constructor: () ->
= .cfg
= options
= new EMap()
walk: () ->
if
.end()
.all()
SW.start 'walker'
= Walk .base,
.map , 'path', , @
.map , 'end', , @
null
pathHandler: (path, stat) ->
ignore = .ignore path
if stat.isDirectory()
.ignore path if ignore
else if not ignore
.fileAdded path
null
endHandler: () ->
Log.info 'walker', 'ready', SW.stop 'walker', 0
.walked()
null
module.exports = Walker