Skip to content

Releases: django-commons/django-tailwind-cli

v4.6.0

11 Apr 14:39
6222888

Choose a tag to compare

💥 Breaking Changes

  • Removed list_templates command: Tailwind CSS 4.x handles template discovery via @source directives in your CSS source file, making this command redundant. If you need to enumerate templates programmatically, use Django's django.template.utils.get_app_template_dirs() directly.

🎯 New Features

  • Configurable minification: New TAILWIND_CLI_AUTOMATIC_MINIFY setting and --minify / --no-minify flag on tailwind build for projects whose asset pipelines already minify CSS. Defaults preserve existing behavior.
  • System binary support: New TAILWIND_CLI_USE_SYSTEM_BINARY setting lets django-tailwind-cli use a Tailwind CSS CLI that is already installed on PATH (e.g. via Homebrew), skipping the auto-download. Pairs with optional TAILWIND_CLI_SYSTEM_BINARY_NAME override. Emits a warning if the installed binary's version differs from an explicitly pinned TAILWIND_CLI_VERSION.
  • Auto @source for editable external apps (opt-in): New TAILWIND_CLI_AUTO_SOURCE_EXTERNAL_APPS setting (default False). When enabled, the auto-generated default source CSS receives one @source directive per installed Django app whose path lives outside both BASE_DIR and site-packages — typically editable-installed packages that ship their own templates. This removes the need for fragile @source "../../../../../..." workarounds. Addresses #187.
  • Watch mode auto-reload: python manage.py tailwind watch now runs under Django's own auto-reloader (the same machinery runserver uses). Changing settings.py or any Python file restarts the watch process, regenerates the source CSS (picking up new INSTALLED_APPS), and restarts the Tailwind CLI subprocess. Pass --noreload to disable.

🛠️ Developer Experience

  • Gitignore cleanup: Trimmed .gitignore to project-relevant entries only
  • Managed .django_tailwind_cli/ is now git-ignored by default: On first use the directory gets a .gitignore containing *, so the downloaded CLI binary and the auto-generated source.css are silently skipped by git add . without any project-level .gitignore tweak from the user. Existing .gitignore files in that directory are preserved. No-op when TAILWIND_CLI_PATH points at a custom location.

🐛 Bug Fixes

  • Tox matrix: Django 4.2/5.2/6.0 factors in tox.ini were ignored because uv sync --locked reinstalled Django from uv.lock after tox's deps. The matrix now excludes Django from the sync and installs the factor-specific version via commands_pre, so just test-all actually covers all supported Django versions.
  • HTTP error reporting: download_with_progress and get_content_sync now surface HTTPError for 4xx/5xx responses as intended. Previously the internal HTTPError was caught by the generic fallback handler and re-wrapped as a RequestError("Unexpected error: …"), hiding the real status code from callers.
  • runserver shutdown message newline: ProcessManager._signal_handler printed a literal \n instead of a real newline, so the Ctrl+C shutdown message got stapled onto the previous terminal output.
  • runserver watch subprocess deadlock: ProcessManager and MultiWatchProcessManager spawned the Tailwind CLI watch subprocess with a captured stdout pipe that was never read. Once the OS pipe buffer filled up (~64 KB on Linux), the watcher blocked on its next write and silently stopped rebuilding. Watch subprocesses now inherit the parent's stdout/stderr, which also means you can see rebuild progress live during tailwind runserver.

🔧 Technical Improvements

  • Type checking: Switched from pyright to basedpyright in pre-commit, added django-stubs as a dev dependency, and resolved a latent pre-existing baseline so the type checker runs clean on all files.
  • Pre-commit hooks: Bumped all hooks to their latest releases (pre-commit-hooks 6.0.0, ruff 0.15.10, pyupgrade 3.21.2, django-upgrade 1.30.0, djade 1.9.0, uv-secure 0.17.1).
  • Test coverage: Raised config.py to 100% and http.py from 67% to 100%, covering the previously-untested download body (chunked writes with progress callbacks), 200/redirect responses, HTTP 4xx/5xx paths, generic URLError branches, and the NoRedirectHandler redirect methods.
  • tailwind runserver is now a transparent passthrough wrapper. Instead of declaring every runserver / runserver_plus flag by hand, the command forwards all unknown options to the underlying Django command. This removes ~120 lines of duplication, fixes the silent gap where several runserver_plus flags (--extra-file, --reloader-interval, --browser, …) were not exposed, and stays in sync with future upstream changes automatically. Existing invocations keep working unchanged; the reduced output of tailwind runserver --help now points users at runserver --help for the full flag list.

4.5.1

29 Dec 17:12
60471e8

Choose a tag to compare

chore: release 4.5.1

4.5.0

29 Dec 17:01
6dab7c7

Choose a tag to compare

chore: release 4.5.0

chore(release): prepare 4.4.2 release

23 Sep 15:07
690bba8

Choose a tag to compare

- Updated CHANGELOG.md with test isolation bug fix
- Fixes cache interference causing test failures in Django 4.1 with Python 3.10

chore(release): prepare 4.4.1 release

23 Sep 14:57
cf28e84

Choose a tag to compare

- Updated CHANGELOG.md with DaisyUI version detection bug fix

v4.4.0: Release 4.4.0

21 Sep 14:18
65f45f5

Choose a tag to compare

Technical improvements release focused on code quality and reliability:

🔧 Technical Improvements:
- Removed requests dependency, replaced with custom HTTP implementation
- Fixed exception naming to follow Python conventions
- Added comprehensive HTTP module tests (coverage 82% → 85%)
- Complete test coverage for network error handling
- Fixed all pyright typing errors for better type safety
- Added Django 6.0 support to testing matrix

This release enhances the robustness and maintainability of the codebase
while removing external dependencies and improving error handling.

2.22.1

13 Jul 08:31
f8d8a5c

Choose a tag to compare

Release 2.22.1 - Fix PyPI publish action compatibility

Release version 4.3.0

12 Jul 20:33
3df7c1e

Choose a tag to compare

New features:
- Interactive setup command for guided configuration
- Configuration viewer to inspect current settings
- Troubleshooting guide for common issues
- Performance optimization tips
- Enhanced verbose mode with detailed diagnostics

Performance improvements:
- Smart rebuilds with file modification checks
- Version caching to reduce API requests
- Optimized process handling and file operations

Developer experience enhancements:
- Better error messages with actionable solutions
- Colorized output with visual feedback
- Improved help text and documentation
- Enhanced template scanning capabilities

Quality assurance:
- 58+ new tests covering integration workflows
- Comprehensive error scenario testing
- Performance optimizations and reliability improvements

4.2.4

08 Jun 09:23
ec5e1df

Choose a tag to compare

Bumped version to 4.2.4

4.2.3

07 Apr 16:58
9f81973

Choose a tag to compare

Moved default storage location BASE_DIR/.django_tailwind_cli