Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement recursive and flat copy #77

Merged
merged 32 commits into from
Jul 12, 2021

Conversation

Idered
Copy link
Contributor

@Idered Idered commented Aug 30, 2020

Fixes #61
Fixes #84
Fixes #60

  • optimize and refactor
  • update docs
  • add better typescript types
  • write more tests
  • handle rename option
  • copying folders structure
  • flattening file structure
  • current tests passing on windows
  • current tests passing on linux

Examples:

cpy('node_modules', 'web_modules') outputs web_modules/node_modules/module1
node_modules files are copied recursively and structure is preserved.

cpy('node_modules/**', 'web_modules') outputs web_modules/module1
node_modules files are copied recursively and structure is preserved. Only node_modules content will be copied to web_modules.

cpy('node_modules/**', 'web_modules', {flat: true}) outputs web_modules/file1
node_modules files are copied recursively and structure is not preserved. Only node_modules content will be copied to web_modules.

cpy('node_modules/**/*.cmd', 'web_modules') will recreate node_modules structure but all non cmd files will be ommited


IssueHunt Summary

Referenced issues

This pull request has been submitted to:


@sindresorhus
Copy link
Owner

@Idered Still interested in finishing this?

@Idered
Copy link
Contributor Author

Idered commented Sep 30, 2020

@sindresorhus Sure, I'll tackle it this or next week. From what I remember, it will change behavior a little - results for some patterns won't be compatible with current version - is this ok?

@sindresorhus
Copy link
Owner

Yes, I can do a major release.

@sindresorhus
Copy link
Owner

@Idered Friendly bump :)

@Idered
Copy link
Contributor Author

Idered commented Dec 30, 2020

I've fixed some stuff, now I just need to add docs

Base automatically changed from master to main January 23, 2021 08:54
@sindresorhus
Copy link
Owner

Just a friendly reminder in case you forgot about this PR.

@mesqueeb
Copy link

@Idered @sindresorhus I'd love to have the copying folders structure feature! Any way I can help?

@sindresorhus
Copy link
Owner

Bump :)

@Idered Idered marked this pull request as ready for review June 11, 2021 23:51
@Idered
Copy link
Contributor Author

Idered commented Jun 11, 2021

@sindresorhus 👋 I've finished it. I'm skipping refactoring and optimizations. Please let me know if it's any good :)

@mesqueeb
Copy link

image

I'd be careful including unrelated commits, it's cognitive strain for the author.

@sindresorhus
Copy link
Owner

hey, let me know if you have any feedback.

Sorry for the slow response. It took me a while to get through my notifications...

Copy link

@martinpe36 martinpe36 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the version number in package.json be bumped:

"version": "8.1.2" -> "version": "8.1.3"

@sindresorhus
Copy link
Owner

Should the version number in package.json be bumped:

Not in a pull request, no.

@philipp-winterle
Copy link

@Idered Waiting on this to be fixed. Will you adjust your pr soon?

@sindresorhus sindresorhus merged commit be263e1 into sindresorhus:main Jul 12, 2021
@sindresorhus
Copy link
Owner

This looks good now. Thank you for working on this, @Idered.

Do you plan more PRs here or should I do a new release?

@sindresorhus
Copy link
Owner

@Idered Did you see #77 (comment) ?

@Josmithr
Copy link

Is there an ETA for the new release containing this?

@Idered
Copy link
Contributor Author

Idered commented Jul 24, 2021

@sindresorhus hey, sorry for delay. I plan to do some more work on this, please don't release it yet.

@philipp-winterle
Copy link

@Idered Not sure you saw this gregnb/filemanager-webpack-plugin#94
Webpack plugin is waiting for cpy to support recursive copy. Since it's a while I would love to have some status updates here.

@sindresorhus
Copy link
Owner

@Idered Just wondering if you still plan to work on this as it's been a while and a release is needed.

@Idered
Copy link
Contributor Author

Idered commented Oct 4, 2021 via email

@mesqueeb
Copy link

@Idered looking forward to it!

@millerds
Copy link

millerds commented Dec 3, 2021

Pinging on this again . . .

@millerds
Copy link

millerds commented Jan 5, 2022

Any chance this is going to be fixed?

@mesqueeb
Copy link

mesqueeb commented Jan 5, 2022

I hope nothing happened to @Idered 😰

@sindresorhus
Copy link
Owner

This is continued in #92.

@sindresorhus
Copy link
Owner

If anyone wants to help out, fix the things that needs to be addressed in #92 and do a new pull request.

@sindresorhus
Copy link
Owner

This is now released: https://github.com/sindresorhus/cpy/releases/tag/v9.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants