Skip to content

Commit

Permalink
Bump to 0.3.0
Browse files Browse the repository at this point in the history
* Add Minify.init_app
* Loosen requirements in setup.py
  • Loading branch information
AceFire6 committed Mar 9, 2022
1 parent 7fb6ea4 commit 3bda302
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "quart_minify"
version = "0.1.1"
version = "0.3.0"
description = "A Quart extension to minify quart response for html, javascript, css and less compilation as well."
authors = ["Jethro Muller <git@jethromuller.co.za>", "Mohamed Feddad <mrf345@gmail.com>"]
license = "MIT"
Expand Down
8 changes: 5 additions & 3 deletions quart_minify/minify.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,15 @@ def __init__(
self.history = {} # where cache hash and compiled response stored
self.hashes = {} # where the hashes and text will be stored

if self.app is None:
raise (AttributeError("minify(app=) requires Quart app instance"))

for arg in ["cssless", "js", "html", "cache"]:
if not isinstance(eval(arg), bool):
raise (TypeError("minify(" + arg + "=) requires True or False"))

if self.app:
self.init_app(self.app)

def init_app(self, app):
self.app = app
self.app.after_request(self.to_loop_tag)

def get_hashed(self, text):
Expand Down
10 changes: 5 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

setuptools.setup(
name="quart-minify",
version="0.1.1",
version="0.3.0",
author="Jethro Muller",
author_email="git@jethromuller.co.za",
description="Quart extension to minify HTML, CSS, JS, and less",
Expand All @@ -33,10 +33,10 @@
"Topic :: Software Development :: Libraries :: Python Modules",
],
install_requires=[
"htmlmin>=0.1.12,<0.2.0",
"jsmin>=2.2,<2.3",
"lesscpy>=0.13.0,<0.14.0",
"quart>=0.10.0,<0.11.0",
"htmlmin>=0.1.12",
"jsmin>=2.2",
"lesscpy>=0.13.0",
"quart>=0.10.0",
],
tests_require=[
"pytest>=5.1,<6.0",
Expand Down

0 comments on commit 3bda302

Please sign in to comment.