mysticatea / cpx

A cli tool to watch and copy file globs.
MIT License
524 stars 36 forks source link

Empty directories are not copied #17

Closed littleli closed 8 years ago

littleli commented 8 years ago

Empty directories are not copied from source destination to target location

Example: cpx 'static/**/*' 'dest' --verbose

This at the moment causing me no issues as I don't need to copy empty directories but I believe it may cause issues to someone. I believe it's a good candidate for a command line option, something like:

cpx 'static/**/*' 'dest' --verbose --include-empty-dirs

Or the other way around, by copying all directories by default and allow user to specify if he wants to avoid empty directories by an command line option.

mysticatea commented 8 years ago

Thank you for this issue.

--include-empty-dirs is good idea. I would appreciate PRs since I don't have enough time to add a new feature now.

When I get time, I will do.

mysticatea commented 8 years ago

I released v1.5.0 with --include-empty-dirs option.