From 0aceb97d33bebc11ca2ec3dc545f30ced30add53 Mon Sep 17 00:00:00 2001 From: Acrofil Date: Wed, 19 Feb 2025 14:04:56 +0200 Subject: [PATCH 1/2] Update django.md for installing tailwindcss v4 --- content/getting-started/django.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/content/getting-started/django.md b/content/getting-started/django.md index cfe5f71e..e313fe91 100644 --- a/content/getting-started/django.md +++ b/content/getting-started/django.md @@ -175,13 +175,13 @@ Awesome! Now you have a working Django project locally. Let's continue by instal 1. Run the following command the install Tailwind CSS as a dev dependency using NPM: ```bash -npm install -D tailwindcss +npm install -D tailwindcss @tailwindcss/cli ``` -2. Using the Tailwind CLI create a new `tailwind.config.js` file: +2. Using the Tailwind CLI create a new `tailwind.config.js` and `postcss.config.js` files: ```bash -npx tailwindcss init +npx tailwindcss-cli@latest init -p ``` Configure the template paths using the `content` value inside the Tailwind configuration file: @@ -202,7 +202,7 @@ module.exports = { ```css /* static/src/input.css */ - +@import "tailwindcss"; @tailwind base; @tailwind components; @tailwind utilities; @@ -211,7 +211,7 @@ module.exports = { 4. Run the following command to watch for changes and compile the Tailwind CSS code: ```bash -npx tailwindcss -i ./static/src/input.css -o ./static/src/output.css --watch +npx @tailwindcss/cli -i ./static/src/input.css -o ./static/src/output.css --watch ``` Open `localhost:3000` in your browser and you'll see working HTML with Tailwind CSS code. From 63e2218ee8a807b27faff208e39f4cbb4e6f7d5c Mon Sep 17 00:00:00 2001 From: Atanas Date: Wed, 19 Feb 2025 20:56:29 +0200 Subject: [PATCH 2/2] remove not used imports in input.css --- content/getting-started/django.md | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/content/getting-started/django.md b/content/getting-started/django.md index e313fe91..01039a0b 100644 --- a/content/getting-started/django.md +++ b/content/getting-started/django.md @@ -178,10 +178,10 @@ Awesome! Now you have a working Django project locally. Let's continue by instal npm install -D tailwindcss @tailwindcss/cli ``` -2. Using the Tailwind CLI create a new `tailwind.config.js` and `postcss.config.js` files: +2. Using the Tailwind CLI create a new `tailwind.config.js`: ```bash -npx tailwindcss-cli@latest init -p +npx tailwindcss-cli@latest init ``` Configure the template paths using the `content` value inside the Tailwind configuration file: @@ -203,9 +203,6 @@ module.exports = { ```css /* static/src/input.css */ @import "tailwindcss"; -@tailwind base; -@tailwind components; -@tailwind utilities; ``` 4. Run the following command to watch for changes and compile the Tailwind CSS code: