cpy

Copy files

MIT License

Downloads
6.7M
Stars
421
Committers
30

Bot releases are visible (Hide)

cpy - Latest Release

Published by sindresorhus 7 months ago

cpy -

Published by sindresorhus 12 months ago

Breaking

  • Require Node.js 18 f9d72e1

Improvements

  • Clone files whenever possible f9d72e1

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).

https://github.com/sindresorhus/cpy/compare/v10.1.0...v11.0.0

cpy -

Published by sindresorhus over 1 year ago

  • Add file sourcePath and destinationPath to the progress event (#112) 936710e

https://github.com/sindresorhus/cpy/compare/v10.0.0...v10.1.0

cpy -

Published by sindresorhus over 1 year ago

Breaking

  • Require Node.js 16 f18399d

Fixes

  • Fix: Make rename function receive filename with extension (#110) cdb7ed4
    • In v9, it incorrectly received a filename without extension.

https://github.com/sindresorhus/cpy/compare/v9.0.1...v10.0.0

cpy -

Published by sindresorhus over 2 years ago

  • Fix flat option when copying a single file (#101) 2014a4f

https://github.com/sindresorhus/cpy/compare/v9.0.0...v9.0.1

cpy -

Published by sindresorhus over 2 years ago

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})

Old output:

New:
cpy('node_modules/**/package.json', 'dest')

New output:

https://github.com/sindresorhus/cpy/compare/v8.1.2...v9.0.0

cpy -

Published by sindresorhus over 3 years ago

cpy -

Published by sindresorhus about 4 years ago

  • Fix Windows compatibility (#78) fdcae2f

https://github.com/sindresorhus/cpy/compare/v8.1.0...v8.1.1

cpy -

Published by sindresorhus over 4 years ago

cpy -

Published by sindresorhus over 4 years ago

  • Revert regression caused by #68 (#75) 0c38098

https://github.com/sindresorhus/cpy/compare/v8.0.0...v8.0.1

cpy -

Published by sindresorhus almost 5 years ago

Breaking

  • Require Node.js 8 7229126
  • Throw if the given source file does not exist (#68) c4014c0

Enhancements

https://github.com/sindresorhus/cpy/compare/v7.3.0...v8.0.0

cpy -

Published by sindresorhus over 5 years ago

Enhancements:

  • Return the destination file paths of the copied files (#46) cfacfc8

https://github.com/sindresorhus/cpy/compare/v7.2.0...v7.3.0

cpy -

Published by sindresorhus over 5 years ago

  • Refactor TypeScript definition to CommonJS compatible export (#59) ac5f3e3

https://github.com/sindresorhus/cpy/compare/v7.1.0...v7.2.0

cpy -

Published by sindresorhus over 5 years ago

  • Update dependencies (#56) 0b73795
  • Add TypeScript definition (#56) 0b73795

https://github.com/sindresorhus/cpy/compare/v7.0.1...v7.1.0

cpy -

Published by sindresorhus over 6 years ago

Breaking:

  • Requires Node.js 6
  • Updates the globby dependency. Since cpy passes options to globby, you might have to update those options. See the globby v7 and globby v8 release notes.

Improvements:

  • Node.js 10 compatibility