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

feat: add array type for pattern and copyFile in stream #42

Closed
wants to merge 2 commits into from

Conversation

markthree
Copy link
Contributor

@markthree markthree commented May 27, 2022

👀 The Globby supports string[],and using streams for copy can support large files

@markthree markthree changed the title fix: add array type for pattern feat: add array type for pattern and copyFile in stream May 27, 2022

export const copyFileInStream = (srcPath: string, outPath: string) => {
const srcStream = createReadStream(srcPath)
const outStream = createWriteStream(outPath, { encoding: 'utf-8' })
Copy link
Member

Choose a reason for hiding this comment

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

I think we can avoid passing encoding, considering some mkdist files might be binary like an image.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is really something I didn't pay attention to

@pi0
Copy link
Member

pi0 commented Oct 27, 2022

Hi dear @markthree. Support for multiple glob patterns added via #41. If you like to, would be happy to accept a new PR to improve copy performance by using streams.

@pi0 pi0 closed this Oct 27, 2022
@markthree
Copy link
Contributor Author

Hi dear @markthree. Support for multiple glob patterns added via #41. If you like to, would be happy to accept a new PR to improve copy performance by using streams.

Good idea. I'll finish it

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

Successfully merging this pull request may close these issues.

2 participants