Skip to content

Commit 3dab6d3

Browse files
authored
Explain plugins in readme
1 parent 2db5427 commit 3dab6d3

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

README.md

+28-2
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ With some additional manual work the upstream upgrade tool will update your appl
195195
/node_modules
196196
```
197197
198-
**Create** a `package.json` in the root of the project:
198+
**Create** or **update** a `package.json` in the root of the project:
199199
200200
```jsonc
201201
{
@@ -232,7 +232,9 @@ With some additional manual work the upstream upgrade tool will update your appl
232232
233233
Then, once you've run that successfully, clean up:
234234
235-
- **Delete** `package.json`, `node_modules/` and `package-lock.json` (or `yarn.lock`), plus remove `/node_modules` from `.gitignore`.
235+
- **Review** `package.json` to remove unnecessary modules.
236+
- This includes modules added for the period of upgrade.
237+
- If you don't need any modules besides `tailwindcss` itself, **delete** `package.json`, `node_modules/` and `package-lock.json` (or `yarn.lock`), plus remove `/node_modules` from `.gitignore`.
236238
- **Go** to your CSS file and remove the following line (if present):
237239
```css
238240
@plugin '@tailwindcss/container-queries';
@@ -273,6 +275,30 @@ This gem also makes available a Puma plugin to manage a live rebuild process whe
273275
274276
This gem also generates a `Procfile.dev` file which will run both the rails server and a live rebuild process (see "Live Rebuild" section below).
275277
278+
#### Install plugins
279+
280+
Tailwind plugins can be installed using `package.json`.
281+
282+
Using Yarn:
283+
284+
``` sh
285+
[ ! -f package.json ] && yarn init
286+
yarn add daisyui # example
287+
```
288+
289+
Using npm:
290+
291+
``` sh
292+
npm init
293+
npm add daisyui # example
294+
```
295+
296+
Than use `@plugin` annotation in `app/assets/tailwind/application.css`:
297+
298+
``` css
299+
@import "tailwindcss";
300+
@plugin "daisyui";
301+
```
276302
277303
### Building for production
278304

0 commit comments

Comments
 (0)