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

Allow newFilename to be returned from hook(); #49

Open
jimthedev opened this issue Jan 5, 2019 · 1 comment
Open

Allow newFilename to be returned from hook(); #49

jimthedev opened this issue Jan 5, 2019 · 1 comment

Comments

@jimthedev
Copy link

jimthedev commented Jan 5, 2019

At the moment this line https://github.com/ariporad/pirates/blob/master/src/index.js#L76 allows you to change code but it does not let you return both newCode and a newFilename. Pirates should allow authors to return either an object that has newCode and/or newFilename properties. If a newFilename is returned then the hook would use that when calling compile.

Would you accept a PR for this @danez @ariporad? Thanks!

@danez
Copy link
Owner

danez commented Jan 6, 2019

That should be fine to implement as long as we do not break backwards compatibility. Out of interest, what is your usecase?

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