Releases: sindresorhus/cpy
Releases · sindresorhus/cpy
v11.1.0
- Update dependencies 7c96d93
v11.0.1
- Remove unused type 778e9e1
v11.0.0
Breaking
- Require Node.js 18 f9d72e1
Improvements
Maintenance
- This package has a lot of problems and I unfortunately don't have time to fix them. I would recommend against using this package until these problems are resolved. Help welcome (see the issue tracker).
v10.1.0
v10.0.0
v9.0.1
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')