optional opts in copyDirSyncRecursive #39

Closed
opened 2012-11-09 07:05:51 -08:00 by longlho · 3 comments
longlho commented 2012-11-09 07:05:51 -08:00 (Migrated from github.com)

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?

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 2012-11-09 07:08:54 -08:00 (Migrated from github.com)

Any plan for release?

Any plan for release?
ryanmcgrath commented 2012-11-09 07:10:18 -08:00 (Migrated from github.com)

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/

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 2012-11-09 07:11:00 -08:00 (Migrated from github.com)

U rock 👍

U rock :+1:
This repository is archived. You cannot comment on issues.
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: code/wrench-js#39
No description provided.