plain 0.6.0__py3-none-any.whl → 0.7.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
plain/cli/cli.py CHANGED
@@ -5,6 +5,7 @@ import shutil
5
5
  import subprocess
6
6
  import sys
7
7
  import traceback
8
+ from importlib.metadata import entry_points
8
9
  from importlib.util import find_spec
9
10
  from pathlib import Path
10
11
 
@@ -286,17 +287,10 @@ def compile(keep_original, fingerprint, compress):
286
287
  )
287
288
  sys.exit(1)
288
289
 
289
- # TODO make this an entrypoint instead
290
- # Compile our Tailwind CSS (including templates in plain itself)
291
- if find_spec("plain.tailwind") is not None:
292
- click.secho("Compiling Tailwind CSS", bold=True)
293
- result = subprocess.run(["plain", "tailwind", "compile", "--minify"])
290
+ for entry_point in entry_points(group="plain.assets.compile"):
291
+ click.secho(f"Running {entry_point.name}", bold=True)
292
+ result = entry_point.load()()
294
293
  print()
295
- if result.returncode:
296
- click.secho(
297
- f"Error compiling Tailwind CSS (exit {result.returncode})", fg="red"
298
- )
299
- sys.exit(result.returncode)
300
294
 
301
295
  # TODO also look in [tool.plain.compile.run]
302
296
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: plain
3
- Version: 0.6.0
3
+ Version: 0.7.0
4
4
  Summary: A web framework for building products with Python.
5
5
  Author: Dave Gaeddert
6
6
  Author-email: dave.gaeddert@dropseed.dev
@@ -9,7 +9,7 @@ plain/assets/urls.py,sha256=ZTIoM1Zq35JaXZ3wFhXhfGa7VoITDNlH9i5RS0R5xow,933
9
9
  plain/assets/views.py,sha256=dhjIpMu0GDR_VGbXM90_6RnC84C2C4bFv1RxDVklGBk,9173
10
10
  plain/cli/README.md,sha256=xjr1K-sIMTi5OWxdxL--O7aoo16Pd1xdawIZtz6BL7Q,2464
11
11
  plain/cli/__init__.py,sha256=9ByBOIdM8DebChjNz-RH2atdz4vWe8somlwNEsbhwh4,40
12
- plain/cli/cli.py,sha256=myxXjRRLt8GQdJ4m3wOgW383D4Z1t1v07PABU0IQ6RM,15095
12
+ plain/cli/cli.py,sha256=TS9sxJfryyVSH4DlHf3FCpIvn6vF0s56aZ-lGG1MpcE,14817
13
13
  plain/cli/formatting.py,sha256=1hZH13y1qwHcU2K2_Na388nw9uvoeQH8LrWL-O9h8Yc,2207
14
14
  plain/cli/packages.py,sha256=69VH1bIi1-5N5l2jlBcR5EP0pt-v16sPar9arO3gCSE,2052
15
15
  plain/cli/print.py,sha256=XraUYrgODOJquIiEv78wSCYGRBplHXtXSS9QtFG5hqY,217
@@ -142,8 +142,8 @@ plain/views/objects.py,sha256=9QBYyb8PgkRirXCQ8-Pms4_yMzP37dfeL30hWRYmtZg,7909
142
142
  plain/views/redirect.py,sha256=KLnlktzK6ZNMTlaEiZpMKQMEP5zeTgGLJ9BIkIJfwBo,1733
143
143
  plain/views/templates.py,sha256=nF9CcdhhjAyp3LB0RrSYnBaHpHzMfPSw719RCdcXk7o,2007
144
144
  plain/wsgi.py,sha256=R6k5FiAElvGDApEbMPTT0MPqSD7n2e2Az5chQqJZU0I,236
145
- plain-0.6.0.dist-info/LICENSE,sha256=m0D5O7QoH9l5Vz_rrX_9r-C8d9UNr_ciK6Qwac7o6yo,3175
146
- plain-0.6.0.dist-info/METADATA,sha256=QbORBVO36VHvPSJS5waroaoHUkGHP8wZ5Q22GO1ocaM,2716
147
- plain-0.6.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
148
- plain-0.6.0.dist-info/entry_points.txt,sha256=7O1RZTmMasKYB73bfqQcTwIhsXo7RjEIKv2WbtTtOIM,39
149
- plain-0.6.0.dist-info/RECORD,,
145
+ plain-0.7.0.dist-info/LICENSE,sha256=m0D5O7QoH9l5Vz_rrX_9r-C8d9UNr_ciK6Qwac7o6yo,3175
146
+ plain-0.7.0.dist-info/METADATA,sha256=ILizFFak8iFUNe3VI8xf3UtKZsz2XB8jmg3zWm2QGS0,2716
147
+ plain-0.7.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
148
+ plain-0.7.0.dist-info/entry_points.txt,sha256=7O1RZTmMasKYB73bfqQcTwIhsXo7RjEIKv2WbtTtOIM,39
149
+ plain-0.7.0.dist-info/RECORD,,
File without changes
File without changes