Davr1 / school-schedule

https://rozvrh.icy.cx
2 stars 0 forks source link

Replace color generation script with a custom Vite plugin #68

Closed iCyuba closed 10 months ago

iCyuba commented 10 months ago

The current pre-build script generates a Sass stylesheet with all the available colors, which are then used to generate the given classes. However, this adds a slow generation step that must run before the build.

This change includes a custom Vite plugin that injects the generated color variables into the global CSS. Unlike the previous solution, this happens during the build and thus adds basically no time penalty.

Davr1 commented 10 months ago