-
Notifications
You must be signed in to change notification settings - Fork 80
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 fileIgnorePattern option #109
Conversation
Thanks for the contribution @mydea . I have the same reservation with this PR as I did with #97 and that is this:
This PR introduces the concept of a "config property as a function" that performs in a fundamentally different way than the functions do for all other plugin configs and it's at odds with the config function convention that ember-cli-deploy employs. Currently it's well documented that if you supply a function as a config property it behaves a certain way. To magically make an exception to this seems like it could be problematic. What are your thoughts on this? Also interested to hear from @lukemelia and @ghedamat too. |
Well, I personally would find this the most simple, configurable solution. But of course, other approaches would also be fine. We could provide a map, but that might be much harder to do e.g. when using fingerprinted assets. Then again, for me the most pressing need for that is for the From my perspective, the primary goal should be to make this addon work nicely with service workers (=sw.js). I think allowing a function would provide the most flexibility, but am absolutely open for other solutions - I'd be glad to adjust the PR accordingly. I also feel that the approach with |
The key thing here is that ember-cli-deploy is built on the convention that you can either provide a value as a config property, or a function. If providing a function, one knows that they can expect that the function will be called with the current The concept of aliasing plugins is the ember-cli-deploy convention for running the same plugin with different configs and the current recommended approach for this use case. Sure, it's a slight bit more code, but is that a problem? It's just come configuration. I'm happy to continue to explore new avenues absolutely and let's continue this conversation if it's of interest to you, but I'm very hesitant to add one off exceptions to the core conventions ember-cli-deploy employs such as is proposed by this PR. |
So, I'll adjust this PR to instead add a |
I'd be more than happy to merge that change, yep 😄 |
I have updated the PR accordingly! |
thanks @mydea I've not been in touch closely but I think it LGTM after the last update wdyt @achambers ? |
Any chance to get this merged? :) |
Sorry @mydea ! we'll be on it shortly! |
@mydea released [email protected] let us know if it works for your needs! |
Awesome, works for me, thank you! |
What Changed & Why
This PR adds the option to specify
fileIgnorePattern
, to ignore certain files (likesw.js
).Usage:
Related issues
This is an alternative solution for #97.
PR Checklist