Metadata-Version: 2.4
Name: critic-py
Version: 0.1.0
Summary: A neat pure-python tool to prepare your static files for deployment
License-Expression: MIT
Project-URL: Homepage, https://github.com/Arcader717/critic-py
Project-URL: Documentation, https://critic-py.readthedocs.io/en/latest/
Project-URL: Repository, https://github.com/Arcader717/critic-py.git
Project-URL: Issues, https://github.com/Arcader717/critic-py/issues
Project-URL: Changelog, https://github.com/Arcader717/critic-py/blob/main/CHANGELOG.md
Keywords: minify,minifier,html,css,js,javascript,static,assets,compression,brotli,gzip,optimize,optimizer,web,build,bundle,preprocess
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: Site Management
Classifier: Topic :: Software Development :: Build Tools
Classifier: Topic :: System :: Archiving :: Compression
Classifier: Topic :: Utilities
Classifier: Topic :: Text Processing :: Markup :: HTML
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: ruff; extra == "dev"
Requires-Dist: black; extra == "dev"
Requires-Dist: mypy; extra == "dev"
Dynamic: license-file

# critic-py

**critic** is a neat pure-python tool for preparing your static files for deployment

## Description

**critic** was legitimately made out of boredom. Considering my main project at the time was failing, and I had a number of restrictions that finally clamped down on it and made it impossible to use it. So I decided to make something else, to help with issues that might've caused the original problem. And I really wanted to make a CLI tool lmao

**critic** currently only comes with a *minifier*, but there are plans for *static compression*, and *analysis*. It's mainly meant to be used in a CI environment, because of the destructive potential, but certain functions can be used without requiring a search on how to revert to a previous commit on [StackOverflow](https://stackoverflow.com)

## Installation

use a package manager like [pip](https://pip.pypa.io/en/stable) to install critic. 
This assumes you have `pip`, if not you can check out [a guide by python](https://packaging.python.org/en/latest/tutorials/installing-packages/) for installing `pip` onto your machine

```bash
pip install critic-py
```

Also, this is a package that relies only on the python stdlib, so no need to worry about extensive dependencies!

## Usage

Currently, you can only minify CSS, and even then, it's lacking a lot of features. But, it handles nested CS, and I love nested CSS! :heart:

To use it, just type in:

```bash
critic minify css
```

## Roadmap

I've got big dreams for this project. 
Not sure how many of them I'll reach, 
but I can at least get disappointed in myself when I add yet another feature out of boredom before I've completed one that's been on here since forever

- [x] CSS Parser
- [ ] CSS Minification
  - [x] Remove comments
  - [x] Remove unnecessary whitespace
  - [ ] Combining duplicate rules
  - [ ] Combining selectors with duplicate declarations
  - [ ] Leading zeros, and trailing units (for things like `0.5px` to `.5px`, and `0px` to `0` respectively)
- [ ] Documentation
- [ ] Tests for the CLI (With pytest!)
- [ ] HTML Parser
- [ ] HTML Minification
  - [ ] Remove Comments
  - [ ] Remove unnecessary whitespace
  - [ ] Others I haven't thought of yet
- [ ] JS Parsser
- [ ] JS Minification
  - [ ] JS Mangling
  - [ ] Sourcemaps
  - [ ] Remove unnecessary whitespace
  - [ ] Insert semicolons where needed to prevent JS Automatic Semicolon Insertion

## Contributing

Check out the [Code of Conduct](CODE_OF_CONDUCT.md) and [Contributing](CONTRIBUTING.md) guidlines when you want to contribute! 
For major changes, please open an issue first to discuss you would like to change.

Also, update tests as appropriate

## License

[MIT](https://choosealicense.com/licenses/mit/)
