Skip to content

Commit 3bda302

Browse files
author
Jethro Muller
committed
Bump to 0.3.0
* Add Minify.init_app * Loosen requirements in setup.py
1 parent 7fb6ea4 commit 3bda302

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "quart_minify"
3-
version = "0.1.1"
3+
version = "0.3.0"
44
description = "A Quart extension to minify quart response for html, javascript, css and less compilation as well."
55
authors = ["Jethro Muller <git@jethromuller.co.za>", "Mohamed Feddad <mrf345@gmail.com>"]
66
license = "MIT"

quart_minify/minify.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,15 @@ def __init__(
3131
self.history = {} # where cache hash and compiled response stored
3232
self.hashes = {} # where the hashes and text will be stored
3333

34-
if self.app is None:
35-
raise (AttributeError("minify(app=) requires Quart app instance"))
36-
3734
for arg in ["cssless", "js", "html", "cache"]:
3835
if not isinstance(eval(arg), bool):
3936
raise (TypeError("minify(" + arg + "=) requires True or False"))
4037

38+
if self.app:
39+
self.init_app(self.app)
40+
41+
def init_app(self, app):
42+
self.app = app
4143
self.app.after_request(self.to_loop_tag)
4244

4345
def get_hashed(self, text):

setup.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
setuptools.setup(
88
name="quart-minify",
9-
version="0.1.1",
9+
version="0.3.0",
1010
author="Jethro Muller",
1111
author_email="git@jethromuller.co.za",
1212
description="Quart extension to minify HTML, CSS, JS, and less",
@@ -33,10 +33,10 @@
3333
"Topic :: Software Development :: Libraries :: Python Modules",
3434
],
3535
install_requires=[
36-
"htmlmin>=0.1.12,<0.2.0",
37-
"jsmin>=2.2,<2.3",
38-
"lesscpy>=0.13.0,<0.14.0",
39-
"quart>=0.10.0,<0.11.0",
36+
"htmlmin>=0.1.12",
37+
"jsmin>=2.2",
38+
"lesscpy>=0.13.0",
39+
"quart>=0.10.0",
4040
],
4141
tests_require=[
4242
"pytest>=5.1,<6.0",

0 commit comments

Comments
 (0)