Create/enable plugins-like architecture
jbalsas opened this issue · 7 comments
Currently r2 doesn't address icon fonts such as FontAwesome
Since this seems quite a specific, it doesn't exactly meet the requirements to land this in the core of r2. It's possible that someone doesn't use it at all, and also that someone using a different icon font could see their icons swap randomly.
We've created kind-of a prototype to swap FontAwesome 3 icons (liferay-labs@e3918ac) which we're currently using.
We'd love to be able to improve that and contribute it back.
Do you think you'd be interested in something like this?
Do you have any plans towards allowing such things?
Thanks for a great work, guys!
Oh, thank you for bringing this up!
I like the idea of plugins though I'm not use if we should have it in a folder in the package itself. I'd rather we have a convention such as Grunt plugins. I'll also look how ESLint does it and try to replicate that functionality.
I guess I'll choose the "Grunt way" which both has conventions and options for NPM packages and a local "extra tasks" directory.
I'll update the ticket once I have something working.
@BYK That sounds awesome!!
I completely agree about building a proper plugin architecture outside the r2 package. We just wanted to have something working and get the ball rolling ;)
As a bonus, it'd be useful if valueMap
functions received some context
such as within which declaration
or rule
are they. This would allow for more specific and conflict-free plugins.
Another important need for this, as we can see, is the possibility to register several plugins for the same valueMap functions. If functions receive context, then it's easy to just affect a selected group of rules, but more than one plugin may want to get a chance at changing the value of some property...
Hey @BYK,
Have you been able to make any progress on this?
Please, let us know if we could assist you in any way :)
Hey @jbalsas, thanks for following up! I'm sorry to keep you waiting though I had a pretty rough month. I plan to spend some time on this in the first half of March.
If you have any prototypes for such plugin system, I can use them as a start too. My plan is to have something similar to grunt
's plugin system.
Hi @BYK, thanks for letting me know. We applied the temporary solution to our fork and that's what we're using for now with good results. Sadly, I got sidetracked with other stuff, so I couldn't work any further on this...
For reference, in case it helps with the specs for the architecture, you can check which kind of additional conversions we're applying in our plugins
I'll try to look into it again, but I'm not sure I'll be able to do that before March either. I'll keep you informed.
Thanks!