Making copy a little friendlier (allowing existing directories) #17

Merged
jannon merged 1 commit from master into master 2012-02-18 01:51:43 -08:00
jannon commented 2012-02-10 16:27:21 -08:00 (Migrated from github.com)

Let's play nice. Now when using copyDirSyncRecursive, you can pass an optional opts object. If this object contains a preserve member, then the function will preserve exisiting directories and only overwrite existing files within the directories. Without passing the option it behaves the same as always. Small change, big convenience.

So before, when doing something like this:

wrench.copyDirSyncRecursive('plugins', path.join("jsdoc", "plugins"));

whatever was already in that plugins directory would get blown away.

Now you can do this:

wrench.copyDirSyncRecursive('plugins', path.join("jsdoc", "plugins"), {preserve: true});

and the plugins directory and anything in it that is not in the directory you are copying will be preserved.

Let's play nice. Now when using copyDirSyncRecursive, you can pass an optional opts object. If this object contains a preserve member, then the function will preserve exisiting directories and only overwrite existing files within the directories. Without passing the option it behaves the same as always. Small change, big convenience. So before, when doing something like this: ``` wrench.copyDirSyncRecursive('plugins', path.join("jsdoc", "plugins")); ``` whatever was already in that plugins directory would get blown away. Now you can do this: ``` wrench.copyDirSyncRecursive('plugins', path.join("jsdoc", "plugins"), {preserve: true}); ``` and the plugins directory and anything in it that is not in the directory you are copying will be preserved.
ryanmcgrath commented 2012-02-18 01:51:48 -08:00 (Migrated from github.com)

I've been sick for the past week, no pull requests have been getting the attention they deserved. This has now been merged.

I've been sick for the past week, no pull requests have been getting the attention they deserved. This has now been merged.
This repository is archived. You cannot comment on pull requests.
No reviewers
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#17
No description provided.