3955 Commits

Author SHA1 Message Date
Adam Wathan
ff64417ff7
Add blur-none with intent to deprecate blur-0 (#4614)
We always use `none` for other utilities where the values have string names like `sm`, but for `blur` I chose `blur-0` for some idiotic reason. Can't have that.
2021-06-10 12:13:19 -04:00
Adam Wathan
34d0551e93
Remove need for filter and backdrop-filter toggles (#4611) 2021-06-10 11:36:15 -04:00
Robin Malfait
f4799a32e8
add tests for the --postcss option in the new CLI (#4607)
* add tests for the --postcss option in the new CLI

* add `oneOf` ability to the `arg()` functionality

By default, `arg()` doesn't have a way to define multiple types. We want
the possibility of using `--postcss` (Boolean) or `--postcss
./custom-path.js`. But by default this is not possible.

This commit will allow us to do a few things, mainly:
- Keep the same API using the `{ type: oneOf(String, Boolean), description: '...' }`
- Keep the `--help` output similar

What we did behind the scenes is make sure to put the non recognized
flags in the `_` arguments list. This is possible by doing `permissive:
true`. We then manually parse those and resolve the correct value.

* ensure that we can use a custom `--postcss ./with-custom-path.js`
2021-06-10 11:35:17 -04:00
Adam Wathan
b86aa5c2a9
Remove need for transform toggle (#4604) 2021-06-10 09:15:41 -04:00
Robin Malfait
6f1d5f03cb
prefer local plugins (#4598)
* prefer local plugins over bundled plugins

* hoist resolving of plugins

* drop `options` when local `cssnano` is found
2021-06-09 13:13:30 -04:00
Adam Wathan
976acb4987 Update changelog 2021-06-09 10:34:14 -04:00
Robin Malfait
8518fee9ea
implement purge safelist (#4580)
* fix --help output in tests

* add tests to ensure we can use `purge.safelist`

* implement the `purge.safelist` for strings

* proxy `purge.safelist` to `purge.options.safelist`

This allows us to have a similar API in `AOT` and `JIT` mode.

* only proxy `purge.safelist` to `purge.options.safelist` if
`purge.options.safelist` doesn't exists yet.
2021-06-09 10:00:09 -04:00
Brad Cornes
3569d49f7e
fix cli purge option when using commas (#4578) 2021-06-08 06:32:50 -04:00
Adam Wathan
40645d7dca Rename --files option in CLI to --purge 2021-06-07 14:01:59 -04:00
Robin Malfait
63a67cb8ef
improve integration tests (#4572)
* remove unused file

using syntax.js instead

* add a way to remove files that are generated from the tests

Essentially setting the restore cache contents to `null` as a special
value.

* combine the stdout and stderr output

* add jest-diff instead of relying on it existing *somewhere*

This also came with a small API change.

* add `--runInBand` to the test script

* add dedicated cli tests for the new Tailwind CLI
2021-06-07 13:50:53 -04:00
Brad Cornes
f1e31682c8
cleanup old contexts in config hash map (#4571) 2021-06-07 13:49:38 -04:00
Adam Wathan
67ee5e033d Write to stdout in watch mode if no output file provided 2021-06-05 16:38:54 -04:00
Adam Wathan
bd20d2c0fa Don't reassign configPath 2021-06-04 12:52:53 -04:00
Adam Wathan
77ef1dba15 Update CHANGELOG 2021-06-04 12:36:41 -04:00
depfu[bot]
c19336ccde
Update all of jest to version 27.0.2 (#4525)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2021-06-04 11:47:17 -04:00
Adam Wathan
cb48248552 Remove existing CLI 2021-06-04 11:44:28 -04:00
Adam Wathan
b9dd8b0a6d
Add peer variant (#4556) 2021-06-04 10:32:49 -04:00
Adam Wathan
746a12602e
Improve new JIT-compatible CLI (#4558)
Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2021-06-04 10:28:09 -04:00
Adam Wathan
05d26a5d43 Make createContext arguments optional
For Brad!
2021-06-03 11:08:04 -04:00
Adam Wathan
65fde59f6a
Make it possible to enable caretColor and content core plugins in AOT mode (#4548)
* Fix issue where disabled corePlugins can't be re-enabled

* Disable caretColor and content core plugins by default, enable in JIT

* Don't disable caretColor/content in default config stub, hard-code for AOT instead

But with ability to still opt-in through your own config. Somewhat messy, but goal is to keep the messes in the AOT path and keep the JIT path pure.

* Fix style

* Revert unnecessary changes

* Fix style
2021-06-03 15:27:22 +02:00
Robin Malfait
d6b11b3807
Group variant stacking (#4551)
* make group variant stacking work

* simplify stacking group variants
2021-06-03 15:25:46 +02:00
Brad Cornes
a3db3a4700
Register PurgeCSS content as PostCSS dependencies (#4543)
* add `glob` property to `dir-dependency` messages

* Add `glob` to `dir-dependency` messages

* register purge content as postcss dependencies
2021-06-03 05:41:32 -04:00
depfu[bot]
1e48728efc Update autoprefixer to version 10.2.6 2021-06-02 15:03:24 +00:00
Brad Cornes
739c0fb83e
Add glob property to dir-dependency messages (#4539)
* add `glob` property to `dir-dependency` messages

* Add `glob` to `dir-dependency` messages
2021-06-02 08:59:14 -04:00
Adam Wathan
271338192c Update CHANGELOG 2021-06-02 08:57:18 -04:00
depfu[bot]
72d09b20d5 Update object-hash to version 2.2.0 2021-06-02 09:43:02 +00:00
depfu[bot]
d02f3c86a8 Update @vercel/ncc to version 0.28.6 2021-06-01 19:32:37 +00:00
Adam Wathan
0a55859867 Update CHANGELOG 2021-06-01 13:27:10 -04:00
Adam Wathan
7c96508273 Update CHANGELOG 2021-06-01 09:06:13 -04:00
Robin Malfait
4528bdc2d8
Start of new CLI (#4526)
* Ignore workspace settings

* Parameterize setting up the context

* WIP

* WIP

* WIP

* WIP

* wip

* WIP

Co-Authored-By: Jesse Katsumata <niconico.clarinet@gmail.com>

* WIP

Co-Authored-By: Jesse Katsumata <niconico.clarinet@gmail.com>

* WIP

Co-Authored-By: Jesse Katsumata <niconico.clarinet@gmail.com>

* Update some comments

Co-Authored-By: Jesse Katsumata <niconico.clarinet@gmail.com>

* Fix bug

* WIP

* WIP'

* more things

* log console.time calls conditionally based on process.env.DEBUG

* add `init` command

* clean up when using --jit

* Make config file optional

* cleanup path.resolve calls

path.resolve('.') is the same as path.resolve(process.cwd(), '.')

* implement `--help`

* shush eslint

* drop unnecessary file

Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
Co-authored-by: Jesse Katsumata <niconico.clarinet@gmail.com>
2021-06-01 14:02:23 +02:00
depfu[bot]
b514a5c9c2 Update @tailwindcss/aspect-ratio to version 0.2.1 2021-05-31 17:03:39 +00:00
Adam Wathan
b574273884
Use tracking context by default (#4514) 2021-05-31 10:02:56 -04:00
Adam Wathan
b71fac8815 Update changelog 2021-05-31 09:23:40 -04:00
Adam Wathan
c746d89b54
Rename lightBlue to sky (#4513) 2021-05-31 09:22:47 -04:00
Adam Wathan
204ad22ec8 Pin PurgeCSS to ^3 for compat build 2021-05-31 08:57:45 -04:00
depfu[bot]
49ccc109a9
Update @fullhuman/postcss-purgecss to version 4.0.3 (#3913)
Co-authored-by: depfu[bot] <23717796+depfu[bot]@users.noreply.github.com>
2021-05-31 08:56:51 -04:00
Adam Wathan
09230b45bd Update changelog 2021-05-30 15:08:37 -04:00
Adam Wathan
7264a5b71b
Generate group parent classes correctly with custom separator (#4508) 2021-05-30 15:02:55 -04:00
Adam Wathan
15642fbcc8 Compare adjacent rules ignoring whitespace 2021-05-30 14:55:30 -04:00
Adam Wathan
8845d112fb Remove log
Co-Authored-By: Jesse Katsumata <niconico.clarinet@gmail.com>
2021-05-29 14:48:10 -04:00
Adam Wathan
b34856cab3 Update CHANGELOG 2021-05-28 13:56:56 -04:00
Adam Wathan
77dfac2bfa
JIT: Add caret-color utilities (#4499)
Co-Authored-By: Jesse Katsumata <niconico.clarinet@gmail.com>

Co-authored-by: Jesse Katsumata <niconico.clarinet@gmail.com>
2021-05-28 13:55:42 -04:00
depfu[bot]
e6ea821a7a Update postcss to version 8.3.0 2021-05-28 04:02:36 +00:00
Adam Wathan
ca6b21a6bc Update plugin name 2021-05-27 12:37:20 -04:00
Robin Malfait
dfdfba25a2
Split context (#4489)
* Remove watcher from context

* WIP

* WIP

* format

* abstract configDependencies

* abstract fileModifiedMap

* abstract candidateFiles

* abstract changedContent to each strategy

* little bit of cleanup

* formatting

Co-authored-by: Adam Wathan <adam.wathan@gmail.com>
2021-05-27 12:29:07 -04:00
Adam Wathan
d1e9632064
JIT: Add exhaustive pseudo-class and pseudo-element variant support (#4482)
* Add first-line, first-letter, and marker variants

* Add selection variant

Co-Authored-By: Eric Rodrigues Pires <eric@eric.dev.br>

* Add remaining pseudo-class variants

* Add target pseudo-class

Co-Authored-By: Peter Neupauer <peter@neupauer.sk>

* add test for parallel variants

* implement parallel variants

Co-authored-by: Eric Rodrigues Pires <eric@eric.dev.br>
Co-authored-by: Peter Neupauer <peter@neupauer.sk>
Co-authored-by: Robin Malfait <malfait.robin@gmail.com>
2021-05-27 17:09:29 +02:00
Brad Cornes
8cd60171e0 always populate the file modified map 2021-05-26 18:20:29 +01:00
Robin Malfait
e119fc9745
make sure to populate the file modified map 2021-05-26 18:20:46 +02:00
Adam Wathan
342a52fccc Don't reuse fileModifiedMap from existing context
This causes changes in template files to be ignored on the second build.
2021-05-26 10:25:28 -04:00
Brad Cornes
55653ba004 move fileModifiedMap to context (fixes #4400) (#4470) 2021-05-26 09:43:05 -04:00