minificar-html
Minifica recursivamente todos os arquivos HTML de uma pasta diretamente no local original. Compacta espaços entre tags, preserva comentários e conteúdo sensível, e minifica CSS e JavaScript embutidos com ferramentas específicas para cada linguagem.
Instalação e uso
pip install minificar-html
minificar-html --pasta ./meu-site
Arquivos .html e .htm são encontrados recursivamente. Opções adicionais:
minificar-html --pasta ./meu-site --simular
minificar-html --pasta ./meu-site --sem-css --sem-js
--simular calcula a economia sem escrever. Blocos <pre> e <textarea>, scripts JSON/import maps, comentários, tags e atributos são preservados. Se um arquivo não estiver em UTF-8 ou não puder ser lido, os demais continuam sendo processados e o comando termina com código de erro.
Desenvolvimento e publicação
python -m venv .venv
. .venv/bin/activate
python -m pip install -e '.[dev]'
pytest
python -m build
python -m twine check dist/*
python -m twine upload dist/*
No upload, use __token__ como usuário e seu token completo do PyPI como senha.
Licença MIT.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file minificar_html-0.2.0.tar.gz.
File metadata
- Download URL: minificar_html-0.2.0.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f25a265be8bd8e92b7716a17fceec1cb8dba8d51a01e9cb8e134c64cdcd354e1
|
|
| MD5 |
333b4adedf1fbf31846a250f08467b3a
|
|
| BLAKE2b-256 |
4696f9b3d2f3437b9b1da7458748044c5446125fc95c000c275dea343f632f04
|
File details
Details for the file minificar_html-0.2.0-py3-none-any.whl.
File metadata
- Download URL: minificar_html-0.2.0-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58094b7365b37f62a0b79466b1a0ebf57d60fa5f520fbdcaaeb88190437fc7c9
|
|
| MD5 |
16ed4ffa1b5b4716bac7222820a8fa5b
|
|
| BLAKE2b-256 |
2e4918c2e5aebd63eef48bf3a0fc806ff1366705499a1c22c5022f124151afc2
|