Skip to content

milesbarr/minifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minifier

A Python tool for minifying website assets by removing unnecessary whitespace, comments, and other redundant content while preserving functionality. Ideal for web developers looking to optimize site performance.

Features

  • Minifies common web file formats: HTML, CSS, JSON, and XML
  • Preserves full functionality while reducing file size
  • Simple command-line interface
  • Can be used as a Python library
  • Fast and lightweight, with minimal dependencies

Supported Formats

  • HTML (.html, .htm, .xhtml)
  • CSS (.css)
  • JSON (.json, .webmanifest)
  • XML (.xml, .rss, .atom, .svg)

Installation

Install directly from GitHub:

pip install git+https://github.com/milesbarr/minifier@main

Or clone the repository and install locally:

git clone https://github.com/milesbarr/minifier.git
cd minifier
pip install .

Usage

Command-Line Interface

Minify a file:

python -m minifier -i input.html -o output.html

Python API

Minify a file:

from minifier import minify_file

minify_file("input.html", "output.html")

License

This project is licensed under the MIT License.

Releases

No releases published

Packages

No packages published

Languages