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 option to use a transform function #164

Closed

Conversation

bmancini42
Copy link

I was using this plugin and thought it would be handy to add an option for a transform function to operate on the path. I use something similar as a resolver plugin in webpack, but for my ava tests it made more sense to do it in a babel plugin. Interested in feedback re: whether or not you feel this belongs in your plugin.

@codecov
Copy link

codecov bot commented Apr 19, 2017

Codecov Report

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

Impacted Files Coverage Δ
src/getRealPath.js 100% <100%> (ø) ⬆️

@fatfisz
Copy link
Contributor

fatfisz commented Apr 19, 2017

This certainly seems interesting :) But instead of a PR I suggest opening an issue, because this needs more discussion. Things to consider:

  • the signature of the function should probably be different, similar to getRealPath: not only the path to transform is important, but also the file where it is used
  • maybe instead of a single transformer function a simple hook system would make more sense?

The important question here is: what could the transformer function do that getRealPath is not doing?

I won't close this, but I strongly suggest you go the way of a feature request instead.

@bmancini42
Copy link
Author

Sure, will do

@bmancini42
Copy link
Author

Added issue #165

@tleunen
Copy link
Owner

tleunen commented Apr 23, 2017

Closing this for now as we need to discussed to find the best way to implement this

@tleunen tleunen closed this Apr 23, 2017
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.

None yet

3 participants