Skip to content

Commit ffe7178

Browse files
committed
doc: add instructions for upgrading class names to v4 in README
1 parent 0ffd236 commit ffe7178

File tree

1 file changed

+17
-10
lines changed

1 file changed

+17
-10
lines changed

README.md

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
* [You don't _have_ to upgrade](#you-dont-_have_-to-upgrade)
1414
* [Upgrade steps](#upgrade-steps)
1515
* [Troubleshooting](#troubleshooting)
16+
* [Upgrading class names for v4](#upgrading-class-names-for-v4)
1617
- [Developing with Tailwindcss](#developing-with-tailwindcss)
1718
* [Configuration and commands](#configuration-and-commands)
1819
* [Building for production](#building-for-production)
@@ -91,21 +92,13 @@ gem "tailwindcss-ruby", "~> 3.4"
9192

9293
First, update to `tailwindcss-rails` v4.0.0 or higher. This will also ensure you're transitively depending on `tailwindcss-ruby` v4.
9394

95+
9496
```html
9597
# Gemfile
9698
gem "tailwindcss-rails", "~> 4.0" # which transitively pins tailwindcss-ruby to v4
9799
```
98-
To replace the class names accordingly for v4, go to ``config/tailwind.config.js`` update the ``content`` part to:
99100

100-
```js
101-
content: [
102-
'../public/*.html',
103-
'../app/helpers/**/*.rb',
104-
'../app/javascript/**/*.js',
105-
'../app/views/**/*.{erb,haml,html,slim}'
106-
],
107-
```
108-
(Just add an additional ``.`` to all the paths referenced)
101+
If you want to migrate class names for v4 (optional), apply this [step](#upgrading-class-names-for-v4) and continue this guide.
109102

110103
Add the following line to the `.gitignore` file:
111104

@@ -207,6 +200,20 @@ We know there are some cases we haven't addressed with the upgrade task:
207200
208201
We'll try to improve the upgrade process over time, but for now you may need to do some manual work to upgrade.
209202
203+
### Upgrading class names for v4
204+
205+
Before running the upgrade task, go to ``config/tailwind.config.js`` update the ``content`` part to:
206+
207+
```js
208+
content: [
209+
'../public/*.html',
210+
'../app/helpers/**/*.rb',
211+
'../app/javascript/**/*.js',
212+
'../app/views/**/*.{erb,haml,html,slim}'
213+
],
214+
```
215+
(Just add an additional ``.`` to all the paths referenced)
216+
210217
211218
## Developing with Tailwindcss
212219

0 commit comments

Comments
 (0)