Skip to content

Commit 6d40101

Browse files
committed
Use installed package configs to get tailwind paths
1 parent 9ad60b7 commit 6d40101

File tree

1 file changed

+10
-9
lines changed
  • bolt-tailwind/bolt/tailwind

1 file changed

+10
-9
lines changed

bolt-tailwind/bolt/tailwind/cli.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import os
2-
import sys
32

43
import click
54

5+
from bolt.packages import packages
66
from bolt.runtime import APP_PATH
77

88
from .core import Tailwind
@@ -74,14 +74,15 @@ def compile(watch, minify):
7474
# These paths should actually work on Windows too
7575
# https://github.com/mrmlnc/fast-glob#how-to-write-patterns-on-windows
7676
args.append("--content")
77-
content = ",".join(
78-
[
79-
os.path.relpath(APP_PATH) + "/**/*.{html,js}",
80-
os.path.relpath(APP_PATH)
81-
+ "/../bolt/**/*.{html,js}", # TODO use INSTALLED_PACKAGES?
82-
sys.exec_prefix + "/lib/python*/site-packages/bolt*/**/*.{html,js}",
83-
]
84-
)
77+
paths = [
78+
os.path.relpath(APP_PATH) + "/**/*.{html,js}",
79+
]
80+
81+
# Add paths from installed packages
82+
for package_config in packages.get_package_configs():
83+
paths.append(os.path.relpath(package_config.path) + "/**/*.{html,js}")
84+
85+
content = ",".join(paths)
8586
print(f"Content: {content}")
8687
args.append(content)
8788

0 commit comments

Comments
 (0)