|
13 | 13 | * [You don't _have_ to upgrade](#you-dont-_have_-to-upgrade)
|
14 | 14 | * [Upgrade steps](#upgrade-steps)
|
15 | 15 | * [Troubleshooting](#troubleshooting)
|
| 16 | + * [Upgrading class names for v4](#upgrading-class-names-for-v4) |
16 | 17 | - [Developing with Tailwindcss](#developing-with-tailwindcss)
|
17 | 18 | * [Configuration and commands](#configuration-and-commands)
|
18 | 19 | * [Building for production](#building-for-production)
|
@@ -91,21 +92,13 @@ gem "tailwindcss-ruby", "~> 3.4"
|
91 | 92 |
|
92 | 93 | First, update to `tailwindcss-rails` v4.0.0 or higher. This will also ensure you're transitively depending on `tailwindcss-ruby` v4.
|
93 | 94 |
|
| 95 | + |
94 | 96 | ```html
|
95 | 97 | # Gemfile
|
96 | 98 | gem "tailwindcss-rails", "~> 4.0" # which transitively pins tailwindcss-ruby to v4
|
97 | 99 | ```
|
98 |
| -To replace the class names accordingly for v4, go to ``config/tailwind.config.js`` update the ``content`` part to: |
99 | 100 |
|
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. |
109 | 102 |
|
110 | 103 | Add the following line to the `.gitignore` file:
|
111 | 104 |
|
@@ -207,6 +200,20 @@ We know there are some cases we haven't addressed with the upgrade task:
|
207 | 200 |
|
208 | 201 | We'll try to improve the upgrade process over time, but for now you may need to do some manual work to upgrade.
|
209 | 202 |
|
| 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 | +
|
210 | 217 |
|
211 | 218 | ## Developing with Tailwindcss
|
212 | 219 |
|
|
0 commit comments