ryanmcgrath / wrench-js

Recursive file operations in Node.js
MIT License
435 stars 71 forks source link

optional opts in copyDirSyncRecursive #39

Closed longlho closed 12 years ago

longlho commented 12 years ago

When I try to do wrench.copyDirSyncRecursive('vsrc/static', 'src'); I got

/Users/longlho/Work/skcl/mobile/node_modules/wrench/lib/wrench.js:187
        if(!opts.whitelist && opts.filter && files[i].match(opts.filter)) continue;
                ^
TypeError: Cannot read property 'whitelist' of undefined
    at Object.exports.copyDirSyncRecursive (/Users/longlho/Work/skcl/mobile/node_modules/wrench/lib/wrench.js:187:11)
    at copyStatic (/Users/longlho/Work/skcl/mobile/build.js:10:10)
    at Object.<anonymous> (/Users/longlho/Work/skcl/mobile/build.js:132:1)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.runMain (module.js:492:10)
    at process.startup.processNextTick.process._tickCallback (node.js:244:9)

So I dig into the src and found opts.whitelist got called w/o checking opts is not undefined. Do u mind fixing it?

longlho commented 12 years ago

Any plan for release?

ryanmcgrath commented 12 years ago

Done before your comment. :)

On Fri, Nov 9, 2012 at 10:08 AM, Long Ho notifications@github.com wrote:

Any plan for release?

— Reply to this email directly or view it on GitHubhttps://github.com/ryanmcgrath/wrench-js/issues/39#issuecomment-10230613.

Skype: ryanmcgrathr Twitter: http://twitter.com/ryanmcgrath/ Web: http://venodesigns.net/ GitHub: http://github.com/ryanmcgrath/

longlho commented 12 years ago

U rock :+1: