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

transform function? #13

Open
swyxio opened this issue Nov 16, 2019 · 4 comments
Open

transform function? #13

swyxio opened this issue Nov 16, 2019 · 4 comments

Comments

@swyxio
Copy link

swyxio commented Nov 16, 2019

I'd love to be able to write my template files in ejs and just run it through copy-template-dir - what do you think of adding a little transform callback for this?

@loklaan
Copy link
Collaborator

loklaan commented Nov 23, 2019

@sw-yx I like the sound of that, and can appreciate the utility.

I'm unsure, however, if it's an appropriate addition to copy-template-dir, as the current "configuration" is done via function arity... and to include an additional cb after the existing completion callback would result in an unwieldy api. If you have a suggestion here though that'd differ from adding to the main fn, I'd be super keen to hear!

@loklaan
Copy link
Collaborator

loklaan commented Nov 23, 2019

After I hit the comment button I had another thought...

To make this kind change work (with a nice API) I think a major change for configuration would be preferred; for example it'd be configured by an object instead of fn arity.

This could be done in a backwards compatible way though, by overriding the first arg in the main fn! I'd be happy to support that, since it's fairly cheap imo.

Input from @yoshuawuyts if he has the bandwidth. (TLDR; we could support more options, such as a transform fn to replace the maxstache usage.)

@swyxio
Copy link
Author

swyxio commented Nov 28, 2019

yeah itd be nice to have. up to y'all how you want to execute on it :)

@swyxio
Copy link
Author

swyxio commented Mar 16, 2020

@yoshuawuyts just wanted to say thanks again for this library, its so handy in various things I do!

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

No branches or pull requests

2 participants