v9.0.0
Breaking
- This package is now pure ESM. Please read this.
- Require Node.js 12
Recursive by default
parents
option was removed- to get flat list of files use
flat: true
option
Example directory structure:
- .github/workflows/main.yml
- .github/funding.yml
Command: cpy('.github/**', 'dest')
Old output:
- dest/funding.yml
- dest/main.yml
New output:
- dest/workflows/main.yml
- dest/main.yml
Recreate old parents: true
Example directory structure:
- .github/workflows/main.yml
- .github/funding.yml
Old:
cpy('.github/**', 'dest', {parents: true})
New:
cpy('.github', 'dest')
Output:
- dest/.github/workglows/main.yml
- dest/.github/funding.yml
Recreate old parents: false
Example directory structure:
- .github/workflows/main.yml
- .github/funding.yml
Old:
cpy('.github/**', 'dest', {parents: false})
New:
cpy('.github', 'dest', {flat: true})
Output:
- dest/main.yml
- dest/funding.yml
Copy all package.json and preserve folder structure
Old:
cpy('node_modules/**/package.json', 'dest', {parents: true})
New:
cpy('node_modules/**/package.json', 'dest')