Add support for basic addVariant plugins with new @plugin directive (#13982)

* Add basic `addVariant` plugin support

* Return early

* Load plugins right away instead later

* Use correct type for variant name

* Preliminary support for addVariant plugins in PostCSS plugin

* Add test for compounding plugin variants

* Add basic `loadPlugin` support to Vite plugin

* Add basic `loadPlugin` support to CLI

* add `io.ts` for integrations

* use shared `loadPlugin` from `tailwindcss/io`

* add `tailwindcss-test-utils` to `@tailwindcss/cli` and `@tailwindcss/vite`

* only add `tailwindcss-test-utils` to `tailwindcss` as a dev dependency

Because `src/io.ts` is requiring the plugin.

* move `tailwindcss-test-utils` to `@tailwindcss/postcss `

This is the spot where we actually need it.

* use newer pnpm version

* Duplicate loadPlugin implementation instead of exporting io file

* Remove another io reference

* update changelog

---------

Co-authored-by: Adam Wathan <4323180+adamwathan@users.noreply.github.com>
Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
This commit is contained in:
Adam Wathan 2024-07-11 09:47:26 -04:00 • committed by GitHub
parent f7686e1982
commit 54474086c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 247 additions and 24 deletions

View file

@ -22,7 +22,7 @@ jobs:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v3
with:
version: ^8.15.0
version: ^9.5.0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3

View file

@ -15,7 +15,7 @@ permissions:
env:
APP_NAME: tailwindcss-oxide
NODE_VERSION: 20
PNPM_VERSION: ^8.15.0
PNPM_VERSION: ^9.5.0
OXIDE_LOCATION: ./crates/node
jobs: