metafizzy / metafizzy/flickity
Convert to Classes instead of UMD
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 7.6k
- Forks
- 593
- PR merge metrics
- No merged PRs in 30d
Description
Do you have any plans to transition to the class syntax instead of UMD? https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes
It would reduce the size of the files by a significant amount which would help compete with all the other slideshow js projects. The only reason I stayed with Flickity was the fullscreen implementation as the others did not have it. I was hesitant at first as flickity was slightly bigger that other ones but i think its possible to reduce it down to around 20 - 30 KB or even less if done right.
I use a custom PHP JavaScript compressor that converts constants, functions, and classes into corresponding letters in the alphabet. This approach helps me further reduce the size of my JavaScript files without compromising maintainability. However, I'm facing difficulties applying this compression technique to the Flickity JavaScript file since it utilizes UMD. As a result, I'm currently in the process of converting the Flickity codebase into classes, which seems feasible. Nonetheless, I wanted to reach out and inquire about your plans.
Additionally, it would be great to have an option to remove certain features from the packaged file, such as JQuery Bridget.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the Flickity JavaScript codebase and its UMD packaging, then consult the linked MDN Classes reference. Clarify the scope of converting the code to classes, reducing the packaged size, and optionally removing JQuery Bridget; done requires an agreed migration plan and validated package-size and compatibility outcomes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100