feat: optimize css sizes

This commit is contained in:
Lucas Colombo
2024-04-12 21:40:30 -03:00
parent b40f501fca
commit c909a416b3
9 changed files with 141 additions and 6475 deletions

16
tools/minimize-css.js Normal file
View File

@@ -0,0 +1,16 @@
import { optimizeCss } from "./tasks/optimize-css.js";
import { cwd } from 'process';
import { join } from 'path';
const distPath = join(cwd(), 'dist');
// run the optimization creating a .min.css file for each .css file in the dist folder
// useful to check issues with the css files optimization
// (in order to use this script, you need to first build the project removing the
// optimization step from the build.js file)
optimizeCss(distPath, false).then(() => {
console.log('Optimization completed');
}).catch((err) => {
console.error(err);
});