django-tailwind-cli 4.2.2__tar.gz → 4.2.3__tar.gz
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.
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/CHANGELOG.md +8 -0
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/PKG-INFO +1 -2
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/docs/settings.md +4 -6
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/pyproject.toml +0 -1
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/src/django_tailwind_cli/config.py +13 -10
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/tests/test_config.py +2 -2
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/uv.lock +0 -11
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/.github/dependabot.yml +0 -0
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/.github/workflows/release.yml +0 -0
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/.github/workflows/test.yml +0 -0
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/.gitignore +0 -0
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/.pre-commit-config.yaml +0 -0
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/.readthedocs.yml +0 -0
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/CODE_OF_CONDUCT.md +0 -0
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/LICENSE +0 -0
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/README.md +0 -0
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/docs/base_template.md +0 -0
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/docs/changelog.md +0 -0
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/docs/index.md +0 -0
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/docs/installation.md +0 -0
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/docs/requirements.txt +0 -0
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/docs/template_tags.md +0 -0
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/docs/usage.md +0 -0
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/justfile +0 -0
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/mkdocs.yml +0 -0
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/src/django_tailwind_cli/__init__.py +0 -0
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/src/django_tailwind_cli/apps.py +0 -0
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/src/django_tailwind_cli/management/__init__.py +0 -0
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/src/django_tailwind_cli/management/commands/__init__.py +0 -0
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/src/django_tailwind_cli/management/commands/tailwind.py +0 -0
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/src/django_tailwind_cli/py.typed +0 -0
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/src/django_tailwind_cli/templates/tailwind_cli/base.html +0 -0
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/src/django_tailwind_cli/templates/tailwind_cli/tailwind_css.html +0 -0
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/src/django_tailwind_cli/templatetags/__init__.py +0 -0
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/src/django_tailwind_cli/templatetags/tailwind_cli.py +0 -0
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/tests/.gitignore +0 -0
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/tests/__init__.py +0 -0
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/tests/assets/css/.gitkeep +0 -0
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/tests/assets/css/tailwind.css +0 -0
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/tests/conftest.py +0 -0
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/tests/settings.py +0 -0
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/tests/templates/tests/base.html +0 -0
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/tests/templates/tests/dummy.email +0 -0
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/tests/test_get_runserver_options.py +0 -0
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/tests/test_management_commands.py +0 -0
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/tests/test_tailwind_css_tag.py +0 -0
- {django_tailwind_cli-4.2.2 → django_tailwind_cli-4.2.3}/tox.ini +0 -0
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.2.3
|
|
4
|
+
|
|
5
|
+
- Reverted the decision to store the CLI and the default config file in proper platform dirs.
|
|
6
|
+
|
|
7
|
+
* Windows has issues with the paths or sometimes it is not possible to create them.
|
|
8
|
+
* VSCode Tailwind Plugin relies on the the existance of the config within the current project.
|
|
9
|
+
* Decision: Create a folder named `.django_tailwind_cli` within the project and store the files there.
|
|
10
|
+
|
|
3
11
|
## 4.2.2
|
|
4
12
|
|
|
5
13
|
- Default configuration stored in the user cache directory is overwritten on every start of the debug server or other management command.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: django-tailwind-cli
|
|
3
|
-
Version: 4.2.
|
|
3
|
+
Version: 4.2.3
|
|
4
4
|
Summary: Django and Tailwind integration based on the prebuilt Tailwind CSS CLI.
|
|
5
5
|
Project-URL: Home, https://django-tailwind-cli.rtfd.io/
|
|
6
6
|
Project-URL: Documentation, https://django-tailwind-cli.rtfd.io/
|
|
@@ -47,7 +47,6 @@ Classifier: Topic :: Utilities
|
|
|
47
47
|
Requires-Python: >=3.9
|
|
48
48
|
Requires-Dist: django-typer>=2.1.2
|
|
49
49
|
Requires-Dist: django>=4.0
|
|
50
|
-
Requires-Dist: platformdirs>=4.3.7
|
|
51
50
|
Requires-Dist: requests>=2.32.3
|
|
52
51
|
Requires-Dist: semver>=3.0.4
|
|
53
52
|
Provides-Extra: django-extensions
|
|
@@ -25,11 +25,11 @@ your project.
|
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
`TAILWIND_CLI_PATH`
|
|
28
|
-
: **Default**: `
|
|
28
|
+
: **Default**: `.django_tailwind_cli`
|
|
29
29
|
|
|
30
30
|
This allows you to override the default of the library where to store the CLI binary.
|
|
31
31
|
|
|
32
|
-
The default behaviour is to store the CLI binary in the directory
|
|
32
|
+
The default behaviour is to store the CLI binary in the hidden directory `.django_tailwind_cli` within the project.
|
|
33
33
|
|
|
34
34
|
But if you want to store it elsewhere or plan to use a custom build binary stored locally, change this setting either to a path to a directory or the full path to the binary. If it points to a directory, this is the download destination otherwise it directly tries to use the referenced binary.
|
|
35
35
|
|
|
@@ -66,11 +66,9 @@ your project.
|
|
|
66
66
|
> ```
|
|
67
67
|
|
|
68
68
|
`TAILWIND_CLI_SRC_CSS`
|
|
69
|
-
**Default**: `
|
|
69
|
+
**Default**: `.django_tailwind_cli/source.css`
|
|
70
70
|
|
|
71
|
-
This variable can be set to
|
|
72
|
-
|
|
73
|
-
If it is set to `None`, the library creates file with the name `source.css` in the directory returned by this call `platformdirs.user_cache_dir("django-tailwind-cli", "django-commons")`. Checkout [platformdirs](https://pypi.org/project/platformdirs/) for details.
|
|
71
|
+
This variable can be set to a relative path and an absolute path.
|
|
74
72
|
|
|
75
73
|
If it is a relative path it is assumed to be relative to `settings.BASE_DIR`. If `settings.BASE_DIR` is not defined or the file doesn't exist a `ValueError` is raised.
|
|
76
74
|
|
|
@@ -3,7 +3,6 @@ import platform
|
|
|
3
3
|
from dataclasses import dataclass
|
|
4
4
|
from pathlib import Path
|
|
5
5
|
|
|
6
|
-
import platformdirs
|
|
7
6
|
import requests
|
|
8
7
|
from django.conf import settings
|
|
9
8
|
from semver import Version
|
|
@@ -123,10 +122,14 @@ def get_config() -> Config:
|
|
|
123
122
|
raise ValueError("TAILWIND_CLI_ASSET_NAME must not be None.")
|
|
124
123
|
|
|
125
124
|
# Determine the full path to the CLI
|
|
126
|
-
cli_path =
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
125
|
+
cli_path = getattr(settings, "TAILWIND_CLI_PATH", None)
|
|
126
|
+
if not cli_path:
|
|
127
|
+
cli_path = ".django_tailwind_cli"
|
|
128
|
+
|
|
129
|
+
cli_path = Path(cli_path)
|
|
130
|
+
if not cli_path.is_absolute():
|
|
131
|
+
cli_path = Path(settings.BASE_DIR) / cli_path
|
|
132
|
+
|
|
130
133
|
if cli_path.exists() and cli_path.is_file() and os.access(cli_path, os.X_OK):
|
|
131
134
|
cli_path = cli_path.expanduser().resolve()
|
|
132
135
|
else:
|
|
@@ -150,15 +153,15 @@ def get_config() -> Config:
|
|
|
150
153
|
# Determine the full path to the source css file.
|
|
151
154
|
src_css = getattr(settings, "TAILWIND_CLI_SRC_CSS", None)
|
|
152
155
|
if not src_css:
|
|
153
|
-
|
|
154
|
-
src_css = Path(user_cache_dir) / "source.css"
|
|
156
|
+
src_css = ".django_tailwind_cli/source.css"
|
|
155
157
|
overwrite_default_config = True
|
|
156
158
|
else:
|
|
157
|
-
src_css = Path(src_css)
|
|
158
|
-
if not src_css.is_absolute():
|
|
159
|
-
src_css = Path(settings.BASE_DIR) / src_css
|
|
160
159
|
overwrite_default_config = False
|
|
161
160
|
|
|
161
|
+
src_css = Path(src_css)
|
|
162
|
+
if not src_css.is_absolute():
|
|
163
|
+
src_css = Path(settings.BASE_DIR) / src_css
|
|
164
|
+
|
|
162
165
|
# Determine if the CLI should be downloaded automatically
|
|
163
166
|
automatic_download = getattr(settings, "TAILWIND_CLI_AUTOMATIC_DOWNLOAD", True)
|
|
164
167
|
|
|
@@ -78,14 +78,14 @@ def test_get_version_with_unofficial_repo_and_version_3(settings: SettingsWrappe
|
|
|
78
78
|
def test_default_config():
|
|
79
79
|
c = get_config()
|
|
80
80
|
assert c.version.major >= 4
|
|
81
|
-
assert "
|
|
81
|
+
assert ".django_tailwind_cli/tailwindcss" in str(c.cli_path)
|
|
82
82
|
assert c.version_str in str(c.cli_path)
|
|
83
83
|
assert c.download_url.startswith(
|
|
84
84
|
f"https://github.com/tailwindlabs/tailwindcss/releases/download/v{c.version_str}/tailwindcss-"
|
|
85
85
|
)
|
|
86
86
|
assert str(c.dist_css) == "/home/user/project/assets/css/tailwind.css"
|
|
87
87
|
assert c.src_css is not None
|
|
88
|
-
assert str(c.src_css).endswith("
|
|
88
|
+
assert str(c.src_css).endswith(".django_tailwind_cli/source.css")
|
|
89
89
|
assert c.overwrite_default_config
|
|
90
90
|
|
|
91
91
|
|
|
@@ -288,7 +288,6 @@ dependencies = [
|
|
|
288
288
|
{ name = "django", version = "4.2.20", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" },
|
|
289
289
|
{ name = "django", version = "5.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" },
|
|
290
290
|
{ name = "django-typer" },
|
|
291
|
-
{ name = "platformdirs" },
|
|
292
291
|
{ name = "requests" },
|
|
293
292
|
{ name = "semver" },
|
|
294
293
|
]
|
|
@@ -314,7 +313,6 @@ requires-dist = [
|
|
|
314
313
|
{ name = "django", specifier = ">=4.0" },
|
|
315
314
|
{ name = "django-extensions", marker = "extra == 'django-extensions'", specifier = ">=3.2" },
|
|
316
315
|
{ name = "django-typer", specifier = ">=2.1.2" },
|
|
317
|
-
{ name = "platformdirs", specifier = ">=4.3.7" },
|
|
318
316
|
{ name = "requests", specifier = ">=2.32.3" },
|
|
319
317
|
{ name = "semver", specifier = ">=3.0.4" },
|
|
320
318
|
{ name = "werkzeug", marker = "extra == 'django-extensions'", specifier = ">=3.0" },
|
|
@@ -517,15 +515,6 @@ wheels = [
|
|
|
517
515
|
{ url = "https://files.pythonhosted.org/packages/88/ef/eb23f262cca3c0c4eb7ab1933c3b1f03d021f2c48f54763065b6f0e321be/packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759", size = 65451 },
|
|
518
516
|
]
|
|
519
517
|
|
|
520
|
-
[[package]]
|
|
521
|
-
name = "platformdirs"
|
|
522
|
-
version = "4.3.7"
|
|
523
|
-
source = { registry = "https://pypi.org/simple" }
|
|
524
|
-
sdist = { url = "https://files.pythonhosted.org/packages/b6/2d/7d512a3913d60623e7eb945c6d1b4f0bddf1d0b7ada5225274c87e5b53d1/platformdirs-4.3.7.tar.gz", hash = "sha256:eb437d586b6a0986388f0d6f74aa0cde27b48d0e3d66843640bfb6bdcdb6e351", size = 21291 }
|
|
525
|
-
wheels = [
|
|
526
|
-
{ url = "https://files.pythonhosted.org/packages/6d/45/59578566b3275b8fd9157885918fcd0c4d74162928a5310926887b856a51/platformdirs-4.3.7-py3-none-any.whl", hash = "sha256:a03875334331946f13c549dbd8f4bac7a13a50a895a0eb1e8c6a8ace80d40a94", size = 18499 },
|
|
527
|
-
]
|
|
528
|
-
|
|
529
518
|
[[package]]
|
|
530
519
|
name = "pluggy"
|
|
531
520
|
version = "1.5.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|