20 Commits

Author SHA1 Message Date
Sachin Raja
c0ee52060c
Generate plugin list file (#4725)
* Generate plugin list file

Removes the importing of all plugins in src/util/resolveConfig to avoid importing CSS.
Import the built plugin list file instead.

* Use `process.cwd()` instead of `__dirname` to resolve path

Co-authored-by: Federico Ciardi <fed.ciardi@gmail.com>

* Import core plugin list in resolveConfig test

* Generate plugin list prebabelify and on install

* Move generation from install to postinstall

Co-authored-by: Federico Ciardi <fed.ciardi@gmail.com>

Co-authored-by: Federico Ciardi <fed.ciardi@gmail.com>
2021-06-23 14:13:03 -04:00
Robin Malfait
f63b4531f5
Add tailwindcss/nesting plugin (#4673)
* add nesting plugin

* rename @tailwindcss/nesting to tailwindcss/nesting

* ignore the built `nesting` plugin

* add a postcss7 compat version

* include `nesting` plugin when publishing

* add `build-plugins` script

This will allow us to keep the plugins in their dedicated folders +
tests + postcss7 compatibility files. However, when we copy over the
plugins to the root. For example `plugins/nesting/` -> `nesting/` we
skip files like `.test.js` and `.postcss7.js`.

* build plugins when running `prepublishOnly`

* improve compat mode

We will use a glob so that we can move all *.postcss7.* files to just
*.* likewise we will also backup to *.* to *.postcss8.* for restoring
purposes.

Concrete example:

- Current state:
  - index.js            // PostCSS 8 implementation
  - index.postcss7.js   // PostCSS 7 implementation

- Run "compat"
  - index.js            // PostCSS 7 implementation
  - index.postcss7.js   // PostCSS 7 implementation
  - index.postcss8.js   // PostCSS 8 implementation (Backup of original)

- Run "compat:restore"
  - index.js            // PostCSS 8 implementation
  - index.postcss7.js   // PostCSS 7 implementation
  - X index.postcss8.js // PostCSS 8 implementation (Removed)

* Update README.md

* ensure we `npm install` before publishing

Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
2021-06-17 09:43:52 -04:00
Robin Malfait
0d47ffd2d3
Fix cloning issues (#4646)
* ensure postcss 7 is dropped from dev dependencies as well

Drop incorrect "help" text

* ensure we are cloning nodes

This is an issue in postcss 7 and fixed in postcss 8. However the compat build still suffers form this issue.
2021-06-14 17:48:28 +02:00
Robin Malfait
7565099c1f
Integrations setup (#4354)
* add integration test tools

* setup jest in the integrations folder

* add `test:integrations` script

The default `npm test` script will ignore all the tests in the
`integrations` folder.

* add integration tests with `webpack 5`

* add integration tests with `postcss-cli`

* add `npm run install:integrations` script

This script will run `npm install` in every integration, and in the
integrations folder itself (to setup Jest for example).

* add `toIncludeCss` custom matcher

* increate Jest timeout for integration tests

* add integration tests with `vite`

* add integration tests with `webpack 4`

* add isomorphic fetch

* add the ability to wait for specific stdout/stderr output

* write vite tests, assert using API calls

We will wait for the correct stdout/stderr output, once we know that we
can request the fresh css, we will fetch it and make assertions
accordingly.

Port is currently hardcoded, maybe we should use a packaage to ensure
that we use a free port.

* add integration tests with `rollup`

* add integration tests with `parcel`

* run all integration tests in band

* add .gitignore in integrations folder
2021-05-18 11:21:35 -04:00
Robin Malfait
bfc61625d9
[WIP] Unify JIT and AOT code paths (#4188)
* WIP

* WIP

* Finish combining JIT and AOT plugins

Still lots of clean up that can be done in some of the more complex ones, but at least it's one file per plugin now.

* Remove unused import

* Fix AOT generation bugs

* Move corePlugins/index.js to corePlugins.js

* Convert JIT files to ESM

* Move tests

* Reorder core plugins to match JIT order

* Update AOT apply tests

* Unify utils

* Combine plugin lists to one single source of truth

* Finish resolving merge conflicts, fix tests

Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
2021-04-30 10:58:40 -04:00
Robin Malfait
195ffe9f50
make some changes to compat mode 2020-11-19 17:02:58 +01:00
Robin Malfait
c238ed15b5
Improve compat mode (#2775)
* simplify compat mode

* make sure postcss is included

* make sure we cannot go into compatibility mode twice
2020-11-16 14:10:08 -05:00
Robin Malfait
1d8679d37e
Postcss7 compatibility (#2773)
* add postcss7 compatibility layers

* add compatibility mode scripts
2020-11-16 13:09:59 -05:00
Adam Wathan
e0788efd4f Generate focus, focus-within, and dark variants for ring utilities 2020-11-12 08:45:21 -05:00
Adam Wathan
38b4eeb288 Prettier likes parens a lot now
git blame is now broken forever.
2020-10-16 15:39:44 -04:00
Adam Wathan
712fe7aeb8 Remove target feature 2020-10-15 15:21:06 -04:00
Adam Wathan
2b22d72af9 Generate experimental build for CDN 2020-08-18 13:28:59 -04:00
Adam Wathan
af17966fe5 Update rebuildFixtures to use 'all' for flags 2020-08-06 16:26:55 -04:00
Adam Wathan
1ac5874732 Add scaffolding for future/experimental flags, with WIP new color palette as example 2020-08-05 14:02:43 -04:00
Martijn Cuppens
727e742142 Prevent source maps from being generated 2020-06-28 23:23:35 +02:00
Adam Wathan
e6fd316347 Don't generate color opacity code in color plugins if not necessary 2020-05-01 15:07:40 -04:00
Adam Wathan
1c353af37d Finish proof of concept for target: 'ie11' feature 2020-04-29 16:24:26 -04:00
Adam Wathan
e7c64806b5 Move build script to scripts 2020-02-03 11:02:08 -05:00
Adam Wathan
ecd1d10264 Remove unused import 2019-12-24 06:57:01 -05:00
Adam Wathan
375a87aa0d Add script for rebuilding fixtures 2019-12-24 06:25:28 -05:00