--- id: css-html-js-minify version: "2.5.5" license: GPL-3 LGPL-3 MIT license_treatment: copyleft maintenance: abandoned --- # css-html-js-minify — CSS HTML JS Minifier License: copyleft · Maintenance: abandoned · Downloads: 294.9K/mo ## What it is and what it does css-html-js-minify is a command-line and Python library tool that reduces the size of CSS, HTML, and JavaScript files by removing unnecessary whitespace, comments, and redundant syntax. It works on single files or entire folders, using async multiprocessing for batch operations. The tool is cross-platform, has no runtime dependencies, and can output minified files with optional features like SHA1 hashing for cache-busting, gzip compression, and file watching for automatic re-compression on changes. You can use it either as a standalone command-line utility (e.g., `css-html-js-minify.py /path/to/project/static/`) or import its functions directly in Python code to minify strings or files programmatically. It handles Unicode and UTF-8 correctly, sorts CSS properties alphabetically to help identify duplicates, and can execute arbitrary commands before and after minification. However, the project has been abandoned since 2018 and is no longer actively maintained, so it may not handle modern JavaScript standards or receive bug fixes. Use it for: - Compress static assets in a web project before deploying to production to reduce bandwidth and load times. - Batch-process an entire folder of CSS, HTML, and JS files with a single command, optionally adding cache-busting hashes to filenames. - Integrate minification into a build pipeline by calling Python functions directly from your build script. - Watch a folder for changes and automatically re-minify files during development, though with a minimum 60-second interval. - Generate gzipped versions of minified CSS and JS files for servers that support gzip content encoding. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Minifies CSS, HTML, and JavaScript files or folders to reduce file size for production deployment, with optional hashing, gzipping, and file watching. Yes, if you need a lightweight, dependency-free minifier for legacy or simple web projects. No, if you require active maintenance, modern JavaScript support (ES6+), or ongoing bug fixes—the project is abandoned as of 2018. Consider alternatives if your codebase relies on contemporary JavaScript features or if you need assurance of compatibility with current Python and web standards. ## Install pip install css-html-js-minify uv add css-html-js-minify poetry add css-html-js-minify ## Installing css-html-js-minify Before you install: No runtime dependencies and low install friction. However, the project is marked abandoned with the last commit in June 2023 and no releases since April 2018, so maintenance and bug fixes are not expected. License in practice: Licensed under GPL-3, LGPL-3, and MIT. The copyleft treatment means you must comply with GPL/LGPL terms if you distribute modified versions or link the code into derivative works; MIT is permissive. Review your use case against these obligations. Quickstart: pip install css-html-js-minify from css_html_js_minify import css_minify, js_minify, html_minify minified_css = css_minify('body {width: 50px;}') minified_js = js_minify('var i = 1; i += 2;') minified_html = html_minify('
hello
') Requires Python 3.6 or later. Verify before relying: - Whether ES6/ES7 JavaScript minification is reliable enough for modern codebases, given the fact sheet notes future JavaScript support is orphan. - Current compatibility with Python versions beyond 3.6, since the project is abandoned and has not been tested against recent Python releases. ## Package facts - License: GPL-3 LGPL-3 MIT (copyleft) - Python support: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 294.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags css html js minifier, web asset compression, minify css javascript html, production file optimization, batch minify static files, gzip and hash web files, async minifier command line, web-assets, build-tool, abandoned [View on SkillFed](https://skillfed.io/packages/css-html-js-minify) · [View on PyPI](https://pypi.org/project/css-html-js-minify/)