Skip to content

Explain plugins in readme #505

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 23, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Explain plugins in readme
  • Loading branch information
bogdan authored Feb 22, 2025
commit 3dab6d3a64c9ee8f86f7d3e49fdee14f2c2dcd2f
30 changes: 28 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ With some additional manual work the upstream upgrade tool will update your appl
/node_modules
```

**Create** a `package.json` in the root of the project:
**Create** or **update** a `package.json` in the root of the project:

```jsonc
{
Expand Down Expand Up @@ -232,7 +232,9 @@ With some additional manual work the upstream upgrade tool will update your appl

Then, once you've run that successfully, clean up:

- **Delete** `package.json`, `node_modules/` and `package-lock.json` (or `yarn.lock`), plus remove `/node_modules` from `.gitignore`.
- **Review** `package.json` to remove unnecessary modules.
- This includes modules added for the period of upgrade.
- 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`.
- **Go** to your CSS file and remove the following line (if present):
```css
@plugin '@tailwindcss/container-queries';
Expand Down Expand Up @@ -273,6 +275,30 @@ This gem also makes available a Puma plugin to manage a live rebuild process whe

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).

#### Install plugins

Tailwind plugins can be installed using `package.json`.

Using Yarn:

``` sh
[ ! -f package.json ] && yarn init
yarn add daisyui # example
```

Using npm:

``` sh
npm init
npm add daisyui # example
```

Than use `@plugin` annotation in `app/assets/tailwind/application.css`:

``` css
@import "tailwindcss";
@plugin "daisyui";
```

### Building for production

Expand Down