Narvuk Logo NARVUK

Minify CSS and JS Files in Python Using rcssmin and rjsmin

Narvuk Avatar By Narvuk | 15 May 2025 04:20

Description

If you're working on static web projects or need to bundle front-end assets programmatically, this Python script offers a clean, automated way to handle CSS and JavaScript minification.

Using the rcssmin and rjsmin libraries, it recursively walks through your source directory, minifies .css and .js files, and saves the output to a designated distribution folder. Non-CSS/JS files are preserved and copied as-is.

This tool is perfect for static site builders, build pipelines, or local development workflows where performance and simplicity matter.

Features:

  • Minifies .css with rcssmin

  • Minifies .js with rjsmin

  • Preserves folder structure

  • Copies non-minifiable files

  • Easy integration into build processes

Details

Category:
Python

Convert Images to WebP Format Using Python and Pillow

Convert images to WebP format using Python and Pillow. This script batch-processes images, optimizes file size, and ensures compatibility by handling different color modes.

Simplify JSON API Requests in C# with a Reusable HTTP Helper

Make cleaner API calls in C# with a reusable helper method that uses HttpClient and System.Text.Json to safely fetch and deserialize JSON with error handling.