Treeshake

Latest version: v0.3.1

Safety actively analyzes 681775 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

0.3.0

This update checks imported HTML files for CSS imports, before parsing and updating the output CSS. It also fixes some major bugs that sometimes lead to overwriting of output files, before parsing was even complete.

:tada: **New in this release**
- Treeshake now checks if a file is imported in the HTML, before optimizing it. Saving both time and output volume.
- Basic unit tests have been introduced to run when you update the code.
- Documentation for code of conduct has been added.

🐞 **Fixed bugs**
- Empty files are no longer being created in the output directory.
- CSS that was used on multiple pages no longer overwrites itself, leading to more consistent behaviour.
- Resolving of relative paths when looking through files has been fixed. The parser used to think that files were also directories.

0.2.4

🐞 **Fixed bugs**
- Pseudoelements are now also included when their parent element is selected.

0.2.3

🐞 **Fixed bugs**
- Removed a print statement from `stylesheet.pyx`

0.2.2

As described in our previous changelog, the `v0.2.x` cycle has come to an end, except for the discovery of critical bugs. The bug described in 12 has been disruptive in the usage of Treeshake and as such a new release has been made public that addresses this issue.

🐞 **Fixed bugs**
- Made use of found list in Stylesheet class, so rules are no longer added twice.

0.2.1

This update enhances the usage of the command line by adding argument parsing to the treeshake module.

🎉 **New in this release**
- Added argument parsing to the command line interface.
- Added `--recursive-css` flag to recursively look for css files.
- Added `--recursive-html` flag to recursively look for html files.
- Added `--safe` flag to ensure all targeted paths to directories exist.
- Added `--out` flag to specify a different output directory than `./out/`.
- Added `--overwrite` flag to specify that the `css` directory should also be used for output.

📝 **Updates to documentation**
- Added an author and author email in `setup.py`.
- Updated the README documentation with information about the command line interface.

🏁 **Final release of v0.2.x**
This release marks the end of the release cycle of the v0.2.x version. Unless majors bugs are discovered, the next release will be v0.3.0, which will be an update cycle regarding documentation and automated testing.

0.2.0

🎉 **New in this release**
- Added `__main__.py` for entry as module.
- Added `treeshake` as console script, so it can be added to sys.path.
- Using `__main__.py` will output how long it took to compile.
- Protected `main` and `dev` branch, so pushes are no longer directly to these branches.

✨ **Improved**
- Added more badges and more documentation to the project.
- Updated imports to now be absolute, instead of relative.
- Changed the signature of `Shaker.improve()` method, so it returns the amounts of handled stylesheets.

🐞 **Fixed bugs**
- Removed badge that was not working from README.

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.