Open bebraw opened 3 years ago
A plugin kind of mechanism would be nice. The cap
directive was my first attempt at extending the Tailwind API but I just hard coded it. There needs to be a way of extending the switch statement essentially (but not actually).
I imagine you could probably extend the theme to have something like:
{
plugins: {
cap: (directive) => ...
}
}
If no translation was found for a directive (it wasn't part of the core API), it would get passed to each function in plugins to see if they could resolve it.
Yeah, sometimes what happens is that you end up with a small plugin core and then implement even the base functionality as plugins you can test in isolation.
Likely there should be a way to add your own utilities to Oceanwind. I have a couple of project specific ones I would like to add there.