You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Refactored all the class based management command into simpler function based commands.
12
32
- Refactored the process to build the runserver command.
13
33
@@ -43,7 +63,8 @@
43
63
44
64
## 2.17.0
45
65
46
-
- Internal refactoring. Config class has been replaced with django-appconfig and some function in the django_tailwind_cli.utils package.
66
+
- Internal refactoring. Config class has been replaced with django-appconfig and some function in
67
+
the django_tailwind_cli.utils package.
47
68
- uv is used for publishing too.
48
69
- Updated tooling configuration.
49
70
@@ -56,17 +77,21 @@
56
77
57
78
## 2.15.0
58
79
59
-
-[#130](https://github.com/oliverandrich/django-tailwind-cli/pull/130) by [@Tobi-De](https://github.com/Tobi-De) extended the support for custom tailwind cli builds. See `TAILWIND_CLI_SRC_REPO` and `TAILWIND_CLI_ASSET_NAME` in the documentation.
80
+
-[#130](https://github.com/oliverandrich/django-tailwind-cli/pull/130) by
81
+
[@Tobi-De](https://github.com/Tobi-De) extended the support for custom tailwind cli builds. See
82
+
`TAILWIND_CLI_SRC_REPO` and `TAILWIND_CLI_ASSET_NAME` in the documentation.
60
83
61
84
## 2.14.0
62
85
63
-
-[#129](https://github.com/oliverandrich/django-tailwind-cli/pull/129) by [@Tobi-De](https://github.com/Tobi-De) add a setting to allow for custom tailwind source repo
86
+
-[#129](https://github.com/oliverandrich/django-tailwind-cli/pull/129) by
87
+
[@Tobi-De](https://github.com/Tobi-De) add a setting to allow for custom tailwind source repo
64
88
- Bumped default version of tailwindcss to 3.4.10.
Copy file name to clipboardExpand all lines: README.md
+2-1
Original file line number
Diff line number
Diff line change
@@ -62,6 +62,7 @@ Checkout the detailed [installation guide](https://django-tailwind-cli.rtfd.io/l
62
62
## Features
63
63
64
64
- Simplest possible integration.
65
+
- Support Tailwind CSS 3.x and 4.x.
65
66
- Management commands:
66
67
67
68
* To start the Tailwind CLI in watch mode during development.
@@ -71,7 +72,7 @@ Checkout the detailed [installation guide](https://django-tailwind-cli.rtfd.io/l
71
72
- Configuration options to adapt the library to your project, when the defaults don't fit you.
72
73
- A template tag to include the Tailwind CSS file in your project.
73
74
- A base template for your project.
74
-
-A sane tailwind.config.js that activates all the official plugins and includes a simple HTMX plugin.
75
+
-Sane default configurations for Tailwind 3.x and Tailwinc 4.x.
75
76
- A management command to install [a workaround to support Tailwind CLI in PyCharm](https://django-tailwind-cli.rtfd.io/latest/usage/#use-with-pycharm).
If you enjoy automatic reloading during development. Install the [django-browser-reload](https://github.com/adamchainz/django-browser-reload) app. The following installation steps are taken from the README of the project.
The name of the optional input file for the Tailwind CLI, where all the directivces and custom styles are defined. This is where you add your own definitions for the different layers.
69
+
!!! warning
70
+
This setting is optional for Tailwind CSS 3.x. For Tailwind CSS 4.x it must not be empty.
71
+
72
+
For **Tailwind CSS 3.x** this optional file is used to define addition CSS rules for your project.
70
73
71
-
If you don't define this setting, the default of the Tailwind CLI is used.
74
+
For **Tailwind CSS 4.x** this required file is used to configure Tailwind CSS and also add
75
+
additional CSS rules for your project. This file is stored relative to the first element of
76
+
the `STATICFILES_DIRS` array.
72
77
73
78
`TAILWIND_CLI_DIST_CSS`
74
79
: **Default**: `"css/tailwind.css"`
75
80
76
-
The name of the output file. This file is stored relative to the first element of the `STATICFILES_DIRS` array.
81
+
The name of the output file. This file is stored relative to the first element of the
82
+
`STATICFILES_DIRS` array.
77
83
78
84
`TAILWIND_CLI_CONFIG_FILE`
79
85
: **Default**: `"tailwind.config.js"`
80
86
81
-
The name of the Tailwind CLI config file. The file is stored relative to the `BASE_DIR` defined in your settings.
87
+
!!! danger
88
+
89
+
Is only required for Tailwind CSS 3.x. If you use it with Tailwind CSS 4.x, it is ignored
90
+
and also raises an exception to force you to remove it.
82
91
83
-
## `tailwind.config.js`
92
+
The name of the Tailwind CLI config file. The file is stored relative to the `BASE_DIR` defined
93
+
in your settings.
94
+
95
+
## `tailwind.config.js` (Tailwind CSS 3.x only)
84
96
85
97
If you don't create a `tailwind.config.js` file yourself, the management commands will create a sane default for you inside the `BASE_DIR` of your project. The default activates all the official plugins for Tailwind CSS and adds a minimal plugin to support some variants for [HTMX](https://htmx.org/).
86
98
@@ -109,72 +121,3 @@ module.exports = {
109
121
],
110
122
};
111
123
```
112
-
113
-
### Fancier version of `tailwind.config.js`
114
-
115
-
This configuration also embraces the nice trick authored by Carlton Gibson in his post [Using Django’s template loaders to configure Tailwind¶](https://noumenal.es/notes/tailwind/django-integration/). The implementation adopts Carlton's implementation to honor the conventions of this project. If you put your `tailwind.config.js` in a different location than your `BASE_DIR`, you have to change this file too.
116
-
117
-
This configuration uses the management command `tailwind list_templates`, which list all the templates files inside your project.
118
-
119
-
!!! warning "Editor Integration besides VS Code"
120
-
121
-
The following default configuration tries to be as smart as possible to find all the templates inside your project and installed dependencies. This works like a charm when you run the debug server using `python manage.py tailwind runserver`. It also works if you start VSCode with `code .` from within the active virtual environment.
122
-
123
-
But it does not work with Sublime Text and the lsp-tailwindcss package or with the various LSP packages for (neo)vim. The reason is, that these intergrations not honoring the active virtual environment when being started. If you have an idea to solve this, patches are welcome.
124
-
125
-
**With editors besides VS Code please use the default config.**
0 commit comments