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

Add transform feature (enabled only on files) #31

Merged
merged 2 commits into from
Jan 22, 2020

Conversation

CPatchane
Copy link
Contributor

@CPatchane CPatchane commented Dec 2, 2019

Add the transform option allowing to transform the file content (buffer) before being copied (behave similarly to webpack-copy-plugin). Also, it warns if the function is run on a directory.

  • Tests
  • Linting
  • Documentation

Fix #21 ?

@CPatchane CPatchane changed the title Add transform feature (enable only on files) Add transform feature (enabled only on files) Dec 2, 2019
@codecov
Copy link

codecov bot commented Dec 2, 2019

Codecov Report

Merging #31 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #31   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           1      1           
  Lines          37     50   +13     
  Branches       13     17    +4     
=====================================
+ Hits           37     50   +13
Impacted Files Coverage Δ
src/index.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cd9e49a...0d3da28. Read the comment docs.

@CPatchane
Copy link
Contributor Author

Any news @vladshcherbin 🙏 ?

@CPatchane
Copy link
Contributor Author

Any update @vladshcherbin 🙏 ?

@CPatchane
Copy link
Contributor Author

CPatchane commented Jan 20, 2020

@vladshcherbin I rebased the this PR on master, and pass the transform prop using the same way as rename and flatten to the generateCopyTarget helper.
Still waiting this to be released (I am currently using a custom git branch to use that missing feature :/)

@vladshcherbin
Copy link
Owner

@CPatchane I've also rebased locally, will hopefully release today 😉

@vladshcherbin vladshcherbin merged commit 253cb0c into vladshcherbin:master Jan 22, 2020
@vladshcherbin
Copy link
Owner

@CPatchane Thank you ❤️

Released in 3.3.0

@CPatchane CPatchane deleted the feat/transform branch January 23, 2020 08:33
@gerwinbrunner
Copy link

@CPatchane @vladshcherbin
Would it be possible to add the filename to the transform function call and not only the content itself?

vladshcherbin added a commit that referenced this pull request Feb 18, 2021
@vladshcherbin
Copy link
Owner

@gerwinbrunner hey, I've added filename to transform function in 3.4.0 for you 😉

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.

Replace in file
3 participants