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

Proposal: introduce modular plugin system #243

Open
bukhtiyarov-a-v opened this issue Oct 15, 2022 · 2 comments
Open

Proposal: introduce modular plugin system #243

bukhtiyarov-a-v opened this issue Oct 15, 2022 · 2 comments

Comments

@bukhtiyarov-a-v
Copy link

Сurrent solution is heavily tied to operations on DOM elements and their state, which in turn complicates the separation of business logic and visualisation.

We would like to be able to separate the business logic and visualisation to be able to easily extend either of them.
A bonus would be the ability to unit test each part of the library.

We propose to split the plugin into two parts: core and DOM.
Also, we propose to add the ability to easily extend the application through the plugin system.

The inspiration for this idea comes from the DayJS plugin system.

import Raty from 'raty/core'
import RatyDOM from 'raty/dom'

// Adding plugin
import 'raty/half-star'

const instance = Raty.create(options)

RatyDOM.render(instance, element)
@bukhtiyarov-a-v
Copy link
Author

@wbotelhos what do you think? :)

bukhtiyarov-a-v pushed a commit to bukhtiyarov-a-v/raty that referenced this issue Oct 15, 2022
@wbotelhos
Copy link
Owner

Hi, @bukhtiyarov-a-v ! you're doing a great job, so thanks until here.

I loved the idea, I'm really excited about that. I'll pay you not one, but two beers for that! ❤️

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