We migrated Bearicorn to Typescript and Less

Even I'm mildly irritated by developers advocating for strong typing with an add functions, I decided migrate repository to Typescript. The reason is quite simple, opportunity to learn something new and possibility anytime just remove types easily (compared to React eg).

Gradual improvement

Backend part was quite straightforward, as I used any type for basically everything. Obviously, the point of the whole thing is missed, but I like to get things done quickly and gradually iterate and improve them slowly rather than spending several weeks.

Tools must bring happiness

Frontend part was a bit harder, as I had to align also Webpack configurations, Eslint plugins and Babel correctly.

Every time I touch Webpack configuration a unicorn dies somewhere. It's a terrible tool and I pray every time I setup new project there will be better tool soon. I'm not aware of a person who enjoys it, what a tragedy when tool doesn't bring happiness.

Superset is the best feature

The minimal process of migrating JS to TS is changing the file extension. This is probably the best feature ever. It's truly painless to start while having the compatibility.

Part of Bearicorn repository stylesheets was written in SASS and another one in LESS from legacy reasons. I decided migrate everything to LESS from the same reason — LESS is CSS superset and backward compatibility. This makes life easier.

Second reason is having option to load Less files directly from browser without pain of having preprocessor installed locally. Obviously this isn't production perfect, but those 100ms in this prototyping stage doesn't play any role and I'm not convinced that it even matters for 99% use-cases. I build websites since my 13teen and from hundreds of projects maybe 3-4 really needed minified CSS.

Follow Bearicorn for more blogs.

— Samuel