Skip to content

Commit

Permalink
Changed fs walking module to use coolaj86/node-walk instead
Browse files Browse the repository at this point in the history
  • Loading branch information
matehat committed Mar 15, 2013
1 parent 00702e0 commit 7a3cd83
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -25,7 +25,7 @@
"dependencies": {
"underscore": ">= 0.0.1",
"commander": ">= 0.5.0",
"walker": ">= 1.0.0",
"walk": ">= 2.0.0",
"growl": ">= 1.4.0",
"ansi-color": ">= 0.2.0",
"semver": ">= 1.0.0",
Expand Down
7 changes: 4 additions & 3 deletions src/source.coffee
Expand Up @@ -113,14 +113,15 @@ class Source
# callback which is called with every single file it finds, and a
# `end` callback, called when the directory walking is done.
list: (cb, end) ->
walk = require 'walker'
walk = require 'walk'
{join} = require 'path'
filelist = []
walker = new walk (rpath = join @path, ''), followLinks: true
walker.on 'file', (root, stat) =>
walker = walk.walk (rpath = join @path, ''), followLinks: true
walker.on 'file', (root, stat, next) =>
fpath = join root[rpath.length+1..], stat.name
return unless @test fpath
cb fpath
next()

walker.on 'end', end if end?

Expand Down

0 comments on commit 7a3cd83

Please sign in to comment.