C

Color Calendar

A customizable events calendar component JavaScript library.

29
C

Color Calendar

A customizable events calendar component JavaScript library.

The problem Color Calendar solves

It is a calendar component library and its purpose is to display events in form of dots, according to the data it is feed. There is a event hook for when a new date is selected which would provide the events for that day, which you can handle accordingly for your app. It can be used as a date picker too.

Challenges I ran into

The problem I ran into was mainly related to bundling the library that users could consume.

I started with using webpack 📦 initially but realized it was not a good bundler for the purpose of building a library as I needed to output the JS file in different module formats (UMD, ESM, and CJS) and webpack made it hard to do so.

I switched to Rollup 🧻 and it was flawless for most of my purposes.

I had one problem, I needed a separate output file for each theme scss file which was difficult to do in rollup since it just compiled all scss files into one output css file. So here I used Gulp 🥤 for processing individual scss files.

Discussion