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

More flexible handling of extensions #1

Open
rgcottrell opened this issue Jul 7, 2014 · 3 comments
Open

More flexible handling of extensions #1

rgcottrell opened this issue Jul 7, 2014 · 3 comments

Comments

@rgcottrell
Copy link

I used this project and it worked great for simplifying a source plugin where the file names by necessity must change. However, I don't think this will work as well in cases where files with multiple extensions might match or in asset pipeline plugins where the file can be modified but keep it's same name.

My hack was to provide inExt and outExt extensions that wouldn't match the provided files to bypass the extension handling, but it would be nice to have an option to either turn off the mapping or provide a programmatic way to select an extension on a per-file basis.

@huntc
Copy link
Owner

huntc commented Jul 8, 2014

Hmmm. It wasn't really intended for anything but source file plugin style situations...

btw: I'm hosting the project here now: https://github.com/typesafehub/jstranspiler/

@rgcottrell
Copy link
Author

The modules that I've been working on (html minification and image optimization) behave very similarly to source plugins: you take a file, optimize it, and then write it one for one into the output staging directory.

I wrote the JavaScript for these modules to behave take the same input and output that the JavaScript in the source plugin module would take. There didn't seem to be any compelling reason to make them different. And if they are using the same parameters, then using the transpiler to move files around makes a lot of sense.

Just an idea. The code isn't too hard to write one way or another.

@huntc
Copy link
Owner

huntc commented Jul 14, 2014

Thanks for the ideas. I'll have to think on this more as it is a slightly different use-case.

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