jergason/recursive-readdir

Ignore auto-generated folders

Closed this issue · 1 comments

Is it possible to ignore fodlers like node_modules or any other auto-generated folders depending on a given regex expression?

Never mind I found out how to do it, I am sorry for creating this issue. I will put my solution here:

var searchPath = path.resolve(path.join(__dirname + '/' + options.directory));

recursive(searchPath, ['node_modules'], function (err, files) {
  // Files is an array of filename 
  console.log(files);
});