tailwindcss 0.0.0-insiders.2fb33ee → 0.0.0-insiders.30ea5b1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +198 -1
- package/README.md +8 -4
- package/colors.js +2 -1
- package/defaultConfig.js +2 -1
- package/defaultTheme.js +2 -1
- package/lib/cli.js +97 -59
- package/lib/constants.js +1 -1
- package/lib/corePluginList.js +15 -1
- package/lib/corePlugins.js +738 -381
- package/lib/css/preflight.css +17 -4
- package/lib/featureFlags.js +14 -9
- package/lib/index.js +1 -3
- package/lib/lib/collapseDuplicateDeclarations.js +80 -0
- package/lib/lib/defaultExtractor.js +42 -0
- package/lib/lib/detectNesting.js +17 -2
- package/lib/lib/evaluateTailwindFunctions.js +10 -6
- package/lib/lib/expandApplyAtRules.js +99 -10
- package/lib/lib/expandTailwindAtRules.js +56 -55
- package/lib/lib/generateRules.js +226 -26
- package/lib/lib/normalizeTailwindDirectives.js +11 -3
- package/lib/lib/resolveDefaultsAtRules.js +67 -56
- package/lib/lib/setupContextUtils.js +236 -190
- package/lib/lib/setupTrackingContext.js +19 -15
- package/lib/lib/sharedState.js +34 -15
- package/lib/lib/substituteScreenAtRules.js +7 -4
- package/lib/processTailwindFeatures.js +6 -1
- package/lib/public/colors.js +4 -8
- package/lib/util/buildMediaQuery.js +13 -24
- package/lib/util/color.js +23 -8
- package/lib/util/createUtilityPlugin.js +5 -5
- package/lib/util/dataTypes.js +38 -7
- package/lib/util/defaults.js +6 -0
- package/lib/util/formatVariantSelector.js +186 -0
- package/lib/util/isValidArbitraryValue.js +64 -0
- package/lib/util/log.js +34 -18
- package/lib/util/nameClass.js +2 -1
- package/lib/util/negateValue.js +3 -1
- package/lib/util/normalizeConfig.js +237 -0
- package/lib/util/normalizeScreens.js +61 -0
- package/lib/util/parseBoxShadowValue.js +77 -0
- package/lib/util/parseDependency.js +3 -0
- package/lib/util/pluginUtils.js +62 -158
- package/lib/util/prefixSelector.js +1 -3
- package/lib/util/resolveConfig.js +31 -82
- package/lib/util/toPath.js +6 -1
- package/lib/util/transformThemeValue.js +23 -13
- package/lib/util/withAlphaVariable.js +29 -14
- package/package.json +20 -20
- package/peers/index.js +4564 -5429
- package/plugin.js +2 -1
- package/resolveConfig.js +2 -1
- package/scripts/create-plugin-list.js +2 -2
- package/src/cli.js +84 -30
- package/src/corePluginList.js +1 -1
- package/src/corePlugins.js +603 -511
- package/src/css/preflight.css +17 -4
- package/src/featureFlags.js +16 -6
- package/src/index.js +1 -7
- package/src/lib/collapseDuplicateDeclarations.js +93 -0
- package/src/lib/defaultExtractor.js +48 -0
- package/src/lib/detectNesting.js +22 -3
- package/src/lib/evaluateTailwindFunctions.js +6 -3
- package/src/lib/expandApplyAtRules.js +101 -3
- package/src/lib/expandTailwindAtRules.js +56 -55
- package/src/lib/generateRules.js +253 -17
- package/src/lib/normalizeTailwindDirectives.js +9 -3
- package/src/lib/resolveDefaultsAtRules.js +67 -50
- package/src/lib/setupContextUtils.js +227 -168
- package/src/lib/setupTrackingContext.js +19 -17
- package/src/lib/sharedState.js +40 -7
- package/src/lib/substituteScreenAtRules.js +6 -3
- package/src/processTailwindFeatures.js +7 -1
- package/src/public/colors.js +4 -9
- package/src/util/buildMediaQuery.js +14 -18
- package/src/util/color.js +20 -7
- package/src/util/createUtilityPlugin.js +2 -2
- package/src/util/dataTypes.js +43 -11
- package/src/util/defaults.js +6 -0
- package/src/util/formatVariantSelector.js +196 -0
- package/src/util/isValidArbitraryValue.js +61 -0
- package/src/util/log.js +22 -21
- package/src/util/nameClass.js +2 -2
- package/src/util/negateValue.js +4 -2
- package/src/util/normalizeConfig.js +262 -0
- package/src/util/normalizeScreens.js +45 -0
- package/src/util/parseBoxShadowValue.js +71 -0
- package/src/util/parseDependency.js +4 -0
- package/src/util/pluginUtils.js +50 -146
- package/src/util/prefixSelector.js +1 -4
- package/src/util/resolveConfig.js +22 -65
- package/src/util/toPath.js +23 -1
- package/src/util/transformThemeValue.js +22 -7
- package/src/util/withAlphaVariable.js +13 -8
- package/stubs/defaultConfig.stub.js +155 -90
- package/stubs/simpleConfig.stub.js +0 -1
- package/lib/lib/setupWatchingContext.js +0 -284
- package/src/lib/setupWatchingContext.js +0 -306
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,157 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
- Nothing yet!
|
|
11
|
+
|
|
12
|
+
## [3.0.10] - 2022-01-04
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- Fix `@apply` in files without `@tailwind` directives ([#6580](https://github.com/tailwindlabs/tailwindcss/pull/6580), [#6875](https://github.com/tailwindlabs/tailwindcss/pull/6875))
|
|
17
|
+
- CLI: avoid unnecessary writes to output files ([#6550](https://github.com/tailwindlabs/tailwindcss/pull/6550))
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
|
|
21
|
+
- Allow piping data into the CLI ([#6876](https://github.com/tailwindlabs/tailwindcss/pull/6876))
|
|
22
|
+
|
|
23
|
+
## [3.0.9] - 2022-01-03
|
|
24
|
+
|
|
25
|
+
### Fixed
|
|
26
|
+
|
|
27
|
+
- Improve `DEBUG` flag ([#6797](https://github.com/tailwindlabs/tailwindcss/pull/6797), [#6804](https://github.com/tailwindlabs/tailwindcss/pull/6804))
|
|
28
|
+
- Ensure we can use `<` and `>` characters in modifiers ([#6851](https://github.com/tailwindlabs/tailwindcss/pull/6851))
|
|
29
|
+
- Validate `theme()` works in arbitrary values ([#6852](https://github.com/tailwindlabs/tailwindcss/pull/6852))
|
|
30
|
+
- Properly detect `theme()` value usage in arbitrary properties ([#6854](https://github.com/tailwindlabs/tailwindcss/pull/6854))
|
|
31
|
+
- Improve collapsing of duplicate declarations ([#6856](https://github.com/tailwindlabs/tailwindcss/pull/6856))
|
|
32
|
+
- Remove support for `TAILWIND_MODE=watch` ([#6858](https://github.com/tailwindlabs/tailwindcss/pull/6858))
|
|
33
|
+
|
|
34
|
+
## [3.0.8] - 2021-12-28
|
|
35
|
+
|
|
36
|
+
### Fixed
|
|
37
|
+
|
|
38
|
+
- Reduce specificity of `abbr` rule in preflight ([#6671](https://github.com/tailwindlabs/tailwindcss/pull/6671))
|
|
39
|
+
- Support HSL with hue units in arbitrary values ([#6726](https://github.com/tailwindlabs/tailwindcss/pull/6726))
|
|
40
|
+
- Add `node16-linux-arm64` target for standalone CLI ([#6693](https://github.com/tailwindlabs/tailwindcss/pull/6693))
|
|
41
|
+
|
|
42
|
+
## [3.0.7] - 2021-12-17
|
|
43
|
+
|
|
44
|
+
### Fixed
|
|
45
|
+
|
|
46
|
+
- Don't mutate custom color palette when overriding per-plugin colors ([#6546](https://github.com/tailwindlabs/tailwindcss/pull/6546))
|
|
47
|
+
- Improve circular dependency detection when using `@apply` ([#6588](https://github.com/tailwindlabs/tailwindcss/pull/6588))
|
|
48
|
+
- Only generate variants for non-`user` layers ([#6589](https://github.com/tailwindlabs/tailwindcss/pull/6589))
|
|
49
|
+
- Properly extract classes with arbitrary values in arrays and classes followed by escaped quotes ([#6590](https://github.com/tailwindlabs/tailwindcss/pull/6590))
|
|
50
|
+
- Improve jsx interpolation candidate matching ([#6593](https://github.com/tailwindlabs/tailwindcss/pull/6593))
|
|
51
|
+
- Ensure `@apply` of a rule inside an AtRule works ([#6594](https://github.com/tailwindlabs/tailwindcss/pull/6594))
|
|
52
|
+
|
|
53
|
+
## [3.0.6] - 2021-12-16
|
|
54
|
+
|
|
55
|
+
### Fixed
|
|
56
|
+
|
|
57
|
+
- Support square bracket notation in paths ([#6519](https://github.com/tailwindlabs/tailwindcss/pull/6519))
|
|
58
|
+
- Ensure all plugins are executed for a given candidate ([#6540](https://github.com/tailwindlabs/tailwindcss/pull/6540))
|
|
59
|
+
|
|
60
|
+
## [3.0.5] - 2021-12-15
|
|
61
|
+
|
|
62
|
+
### Fixed
|
|
63
|
+
|
|
64
|
+
- Revert: add `li` to list-style reset ([9777562d](https://github.com/tailwindlabs/tailwindcss/commit/9777562da37ee631bbf77374c0d14825f09ef9af))
|
|
65
|
+
|
|
66
|
+
## [3.0.4] - 2021-12-15
|
|
67
|
+
|
|
68
|
+
### Fixed
|
|
69
|
+
|
|
70
|
+
- Insert always-on defaults layer in correct spot ([#6526](https://github.com/tailwindlabs/tailwindcss/pull/6526))
|
|
71
|
+
|
|
72
|
+
## [3.0.3] - 2021-12-15
|
|
73
|
+
|
|
74
|
+
### Added
|
|
75
|
+
|
|
76
|
+
- Warn about invalid globs in `content` ([#6449](https://github.com/tailwindlabs/tailwindcss/pull/6449))
|
|
77
|
+
- Add standalone tailwindcss CLI ([#6506](https://github.com/tailwindlabs/tailwindcss/pull/6506))
|
|
78
|
+
- Add `li` to list-style reset ([00f60e6](https://github.com/tailwindlabs/tailwindcss/commit/00f60e61013c6e4e3419e4b699371a13eb30b75d))
|
|
79
|
+
|
|
80
|
+
### Fixed
|
|
81
|
+
|
|
82
|
+
- Don't output unparsable values ([#6469](https://github.com/tailwindlabs/tailwindcss/pull/6469))
|
|
83
|
+
- Fix text decoration utilities from overriding the new text decoration color/style/thickness utilities when used with a modifier ([#6378](https://github.com/tailwindlabs/tailwindcss/pull/6378))
|
|
84
|
+
- Move defaults to their own always-on layer ([#6500](https://github.com/tailwindlabs/tailwindcss/pull/6500))
|
|
85
|
+
- Support negative values in safelist patterns ([#6480](https://github.com/tailwindlabs/tailwindcss/pull/6480))
|
|
86
|
+
|
|
87
|
+
## [3.0.2] - 2021-12-13
|
|
88
|
+
|
|
89
|
+
### Fixed
|
|
90
|
+
|
|
91
|
+
- Temporarily disable optimize universal defaults, fixes issue with transforms/filters/rings not being `@apply`-able in CSS modules/Svelte components/Vue components ([#6461](https://github.com/tailwindlabs/tailwindcss/pull/6461))
|
|
92
|
+
|
|
93
|
+
## [3.0.1] - 2021-12-10
|
|
94
|
+
|
|
95
|
+
### Fixed
|
|
96
|
+
|
|
97
|
+
- Ensure complex variants with multiple classes work ([#6311](https://github.com/tailwindlabs/tailwindcss/pull/6311))
|
|
98
|
+
- Re-add `default` interop to public available functions ([#6348](https://github.com/tailwindlabs/tailwindcss/pull/6348))
|
|
99
|
+
- Detect circular dependencies when using `@apply` ([#6365](https://github.com/tailwindlabs/tailwindcss/pull/6365))
|
|
100
|
+
- Fix defaults optimization when vendor prefixes are involved ([#6369](https://github.com/tailwindlabs/tailwindcss/pull/6369))
|
|
101
|
+
|
|
102
|
+
## [3.0.0] - 2021-12-09
|
|
103
|
+
|
|
104
|
+
### Fixed
|
|
105
|
+
|
|
106
|
+
- Enforce the order of some variants (like `before` and `after`) ([#6018](https://github.com/tailwindlabs/tailwindcss/pull/6018))
|
|
107
|
+
|
|
108
|
+
### Added
|
|
109
|
+
|
|
110
|
+
- Add `placeholder` variant ([#6106](https://github.com/tailwindlabs/tailwindcss/pull/6106))
|
|
111
|
+
- Add composable `touch-action` utilities ([#6115](https://github.com/tailwindlabs/tailwindcss/pull/6115))
|
|
112
|
+
- Add support for "arbitrary properties" ([#6161](https://github.com/tailwindlabs/tailwindcss/pull/6161))
|
|
113
|
+
- Add `portrait` and `landscape` variants ([#6046](https://github.com/tailwindlabs/tailwindcss/pull/6046))
|
|
114
|
+
- Add `text-decoration-style`, `text-decoration-thickness`, and `text-underline-offset` utilities ([#6004](https://github.com/tailwindlabs/tailwindcss/pull/6004))
|
|
115
|
+
- Add `menu` reset to preflight ([#6213](https://github.com/tailwindlabs/tailwindcss/pull/6213))
|
|
116
|
+
- Allow `0` as a valid `length` value ([#6233](https://github.com/tailwindlabs/tailwindcss/pull/6233), [#6259](https://github.com/tailwindlabs/tailwindcss/pull/6259))
|
|
117
|
+
- Add CSS functions to data types ([#6258](https://github.com/tailwindlabs/tailwindcss/pull/6258))
|
|
118
|
+
- Support negative values for `scale-*` utilities ([c48e629](https://github.com/tailwindlabs/tailwindcss/commit/c48e629955585ad18dadba9f470fda59cc448ab7))
|
|
119
|
+
- Improve `length` data type, by validating each value individually ([#6283](https://github.com/tailwindlabs/tailwindcss/pull/6283))
|
|
120
|
+
|
|
121
|
+
### Changed
|
|
122
|
+
|
|
123
|
+
- Deprecate `decoration-slice` and `decoration-break` in favor `box-decoration-slice` and `box-decoration-break` _(non-breaking)_ ([#6004](https://github.com/tailwindlabs/tailwindcss/pull/6004))
|
|
124
|
+
|
|
125
|
+
## [3.0.0-alpha.2] - 2021-11-08
|
|
126
|
+
|
|
127
|
+
### Changed
|
|
128
|
+
|
|
129
|
+
- Don't use pointer cursor on disabled buttons by default ([#5772](https://github.com/tailwindlabs/tailwindcss/pull/5772))
|
|
130
|
+
- Set default content value in preflight instead of within each before/after utility ([#5820](https://github.com/tailwindlabs/tailwindcss/pull/5820))
|
|
131
|
+
- Remove `prefix` as a function ([#5829](https://github.com/tailwindlabs/tailwindcss/pull/5829))
|
|
132
|
+
|
|
133
|
+
### Added
|
|
134
|
+
|
|
135
|
+
- Add `flex-basis` utilities ([#5671](https://github.com/tailwindlabs/tailwindcss/pull/5671))
|
|
136
|
+
- Make negative values a first-class feature ([#5709](https://github.com/tailwindlabs/tailwindcss/pull/5709))
|
|
137
|
+
- Add `fit-content` values for `min/max-width/height` utilities ([#5638](https://github.com/tailwindlabs/tailwindcss/pull/5638))
|
|
138
|
+
- Add `min/max-content` values for `min/max-height` utilities ([#5729](https://github.com/tailwindlabs/tailwindcss/pull/5729))
|
|
139
|
+
- Add all standard `cursor-*` values by default ([#5734](https://github.com/tailwindlabs/tailwindcss/pull/5734))
|
|
140
|
+
- Add `grow-*` and `shrink-*` utilities, deprecate `flex-grow-*` and `flex-shrink-*` ([#5733](https://github.com/tailwindlabs/tailwindcss/pull/5733))
|
|
141
|
+
- Add `text-decoration-color` utilities ([#5760](https://github.com/tailwindlabs/tailwindcss/pull/5760))
|
|
142
|
+
- Add new declarative `addVariant` API ([#5809](https://github.com/tailwindlabs/tailwindcss/pull/5809))
|
|
143
|
+
- Add first-class `print` variant for targeting printed media ([#5885](https://github.com/tailwindlabs/tailwindcss/pull/5885))
|
|
144
|
+
- Add `outline-style`, `outline-color`, `outline-width` and `outline-offset` utilities ([#5887](https://github.com/tailwindlabs/tailwindcss/pull/5887))
|
|
145
|
+
- Add full color palette for `fill-*` and `stroke-*` utilities (#5933[](https://github.com/tailwindlabs/tailwindcss/pull/5933))
|
|
146
|
+
- Add composable API for colored box shadows ([#5979](https://github.com/tailwindlabs/tailwindcss/pull/5979))
|
|
147
|
+
|
|
148
|
+
### Fixed
|
|
149
|
+
|
|
150
|
+
- Configure chokidar's `awaitWriteFinish` setting to avoid occasional stale builds on Windows ([#5774](https://github.com/tailwindlabs/tailwindcss/pull/5774))
|
|
151
|
+
- Fix CLI `--content` option ([#5775](https://github.com/tailwindlabs/tailwindcss/pull/5775))
|
|
152
|
+
- Fix before/after utilities overriding custom content values at larger breakpoints ([#5820](https://github.com/tailwindlabs/tailwindcss/pull/5820))
|
|
153
|
+
- Cleanup duplicate properties ([#5830](https://github.com/tailwindlabs/tailwindcss/pull/5830))
|
|
154
|
+
- Allow `_` inside `url()` when using arbitrary values ([#5853](https://github.com/tailwindlabs/tailwindcss/pull/5853))
|
|
155
|
+
- Prevent crashes when using comments in `@layer` AtRules ([#5854](https://github.com/tailwindlabs/tailwindcss/pull/5854))
|
|
156
|
+
- Handle color transformations properly with `theme(...)` for all relevant plugins ([#4533](https://github.com/tailwindlabs/tailwindcss/pull/4533), [#5871](https://github.com/tailwindlabs/tailwindcss/pull/5871))
|
|
157
|
+
- Ensure `@apply`-ing a utility with multiple definitions works ([#5870](https://github.com/tailwindlabs/tailwindcss/pull/5870))
|
|
158
|
+
|
|
159
|
+
## [3.0.0-alpha.1] - 2021-10-01
|
|
160
|
+
|
|
10
161
|
### Changed
|
|
11
162
|
|
|
12
163
|
- Remove AOT engine, make JIT the default ([#5340](https://github.com/tailwindlabs/tailwindcss/pull/5340))
|
|
@@ -14,23 +165,53 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
14
165
|
- Remove dependency on `modern-normalize`, inline and consolidate with Preflight ([#5358](https://github.com/tailwindlabs/tailwindcss/pull/5358))
|
|
15
166
|
- Enable extended color palette by default with updated color names ([#5384](https://github.com/tailwindlabs/tailwindcss/pull/5384))
|
|
16
167
|
- Move `vertical-align` values to config file instead of hard-coding ([#5487](https://github.com/tailwindlabs/tailwindcss/pull/5487))
|
|
168
|
+
- Rename `overflow-clip` to `text-clip` and `overflow-ellipsis` to `text-ellipsis` ([#5630](https://github.com/tailwindlabs/tailwindcss/pull/5630))
|
|
17
169
|
|
|
18
170
|
### Added
|
|
19
171
|
|
|
20
172
|
- Add native `aspect-ratio` utilities ([#5359](https://github.com/tailwindlabs/tailwindcss/pull/5359))
|
|
21
173
|
- Unify config callback helpers into single object ([#5382](https://github.com/tailwindlabs/tailwindcss/pull/5382))
|
|
22
174
|
- Preserve original color format when adding opacity whenever possible ([#5154](https://github.com/tailwindlabs/tailwindcss/pull/5154))
|
|
175
|
+
- Add `accent-color` utilities ([#5387](https://github.com/tailwindlabs/tailwindcss/pull/5387))
|
|
23
176
|
- Add `scroll-behavior` utilities ([#5388](https://github.com/tailwindlabs/tailwindcss/pull/5388))
|
|
177
|
+
- Add `will-change` utilities ([#5448](https://github.com/tailwindlabs/tailwindcss/pull/5448))
|
|
178
|
+
- Add `text-indent` utilities ([#5449](https://github.com/tailwindlabs/tailwindcss/pull/5449))
|
|
179
|
+
- Add `column` utilities ([#5457](https://github.com/tailwindlabs/tailwindcss/pull/5457))
|
|
24
180
|
- Add `border-hidden` utility ([#5485](https://github.com/tailwindlabs/tailwindcss/pull/5485))
|
|
25
181
|
- Add `align-sub` and `align-super` utilities by default ([#5486](https://github.com/tailwindlabs/tailwindcss/pull/5486))
|
|
26
182
|
- Add `break-before`, `break-inside` and `break-after` utilities ([#5530](https://github.com/tailwindlabs/tailwindcss/pull/5530))
|
|
27
183
|
- Add `file` variant for `::file-selector-button` pseudo element ([#4936](https://github.com/tailwindlabs/tailwindcss/pull/4936))
|
|
184
|
+
- Add comprehensive arbitrary value support ([#5568](https://github.com/tailwindlabs/tailwindcss/pull/5568))
|
|
28
185
|
- Add `touch-action` utilities ([#5603](https://github.com/tailwindlabs/tailwindcss/pull/5603))
|
|
29
186
|
- Add `inherit` to default color palette ([#5597](https://github.com/tailwindlabs/tailwindcss/pull/5597))
|
|
187
|
+
- Add `overflow-clip`, `overflow-x-clip` and `overflow-y-clip` utilities ([#5630](https://github.com/tailwindlabs/tailwindcss/pull/5630))
|
|
188
|
+
- Add `[open]` variant ([#5627](https://github.com/tailwindlabs/tailwindcss/pull/5627))
|
|
189
|
+
- Add `scroll-snap` utilities ([#5637](https://github.com/tailwindlabs/tailwindcss/pull/5637))
|
|
190
|
+
- Add `border-x` and `border-y` width and color utilities ([#5639](https://github.com/tailwindlabs/tailwindcss/pull/5639))
|
|
30
191
|
|
|
31
192
|
### Fixed
|
|
32
193
|
|
|
33
194
|
- Fix defining colors as functions when color opacity plugins are disabled ([#5470](https://github.com/tailwindlabs/tailwindcss/pull/5470))
|
|
195
|
+
- Fix using negated `content` globs ([#5625](https://github.com/tailwindlabs/tailwindcss/pull/5625))
|
|
196
|
+
- Fix using backslashes in `content` globs ([#5628](https://github.com/tailwindlabs/tailwindcss/pull/5628))
|
|
197
|
+
|
|
198
|
+
## [2.2.19] - 2021-10-29
|
|
199
|
+
|
|
200
|
+
### Fixed
|
|
201
|
+
|
|
202
|
+
- Ensure `corePlugins` order is consisent in AOT mode ([#5928](https://github.com/tailwindlabs/tailwindcss/pull/5928))
|
|
203
|
+
|
|
204
|
+
## [2.2.18] - 2021-10-29
|
|
205
|
+
|
|
206
|
+
### Fixed
|
|
207
|
+
|
|
208
|
+
- Bump versions for security vulnerabilities ([#5924](https://github.com/tailwindlabs/tailwindcss/pull/5924))
|
|
209
|
+
|
|
210
|
+
## [2.2.17] - 2021-10-13
|
|
211
|
+
|
|
212
|
+
### Fixed
|
|
213
|
+
|
|
214
|
+
- Configure chokidar's `awaitWriteFinish` setting to avoid occasional stale builds on Windows ([#5758](https://github.com/tailwindlabs/tailwindcss/pull/5758))
|
|
34
215
|
|
|
35
216
|
## [2.2.16] - 2021-09-26
|
|
36
217
|
|
|
@@ -1590,7 +1771,23 @@ No release notes
|
|
|
1590
1771
|
|
|
1591
1772
|
- Everything!
|
|
1592
1773
|
|
|
1593
|
-
[unreleased]: https://github.com/tailwindlabs/tailwindcss/compare/
|
|
1774
|
+
[unreleased]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.10...HEAD
|
|
1775
|
+
[3.0.10]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.9...v3.0.10
|
|
1776
|
+
[3.0.9]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.8...v3.0.9
|
|
1777
|
+
[3.0.8]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.7...v3.0.8
|
|
1778
|
+
[3.0.7]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.6...v3.0.7
|
|
1779
|
+
[3.0.6]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.5...v3.0.6
|
|
1780
|
+
[3.0.5]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.4...v3.0.5
|
|
1781
|
+
[3.0.4]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.3...v3.0.4
|
|
1782
|
+
[3.0.3]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.2...v3.0.3
|
|
1783
|
+
[3.0.2]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.1...v3.0.2
|
|
1784
|
+
[3.0.1]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.0...v3.0.1
|
|
1785
|
+
[3.0.0]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.0-alpha.2...v3.0.0
|
|
1786
|
+
[3.0.0-alpha.2]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.0-alpha.1...v3.0.0-alpha.2
|
|
1787
|
+
[3.0.0-alpha.1]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.19...v3.0.0-alpha.1
|
|
1788
|
+
[2.2.19]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.18...v2.2.19
|
|
1789
|
+
[2.2.18]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.17...v2.2.18
|
|
1790
|
+
[2.2.17]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.16...v2.2.17
|
|
1594
1791
|
[2.2.16]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.15...v2.2.16
|
|
1595
1792
|
[2.2.15]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.14...v2.2.15
|
|
1596
1793
|
[2.2.14]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.13...v2.2.14
|
package/README.md
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
<p>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
<a href="https://tailwindcss.com/#gh-light-mode-only" target="_blank">
|
|
3
|
+
<img src="./.github/logo-light.svg" alt="Tailwind CSS" width="350" height="70">
|
|
4
|
+
</a>
|
|
5
|
+
<a href="https://tailwindcss.com/#gh-dark-mode-only" target="_blank">
|
|
6
|
+
<img src="./.github/logo-dark.svg" alt="Tailwind CSS" width="350" height="70">
|
|
7
|
+
</a>
|
|
6
8
|
</p>
|
|
7
9
|
|
|
10
|
+
A utility-first CSS framework for rapidly building custom user interfaces.
|
|
11
|
+
|
|
8
12
|
<p>
|
|
9
13
|
<a href="https://github.com/tailwindlabs/tailwindcss/actions"><img src="https://img.shields.io/github/workflow/status/tailwindlabs/tailwindcss/Node.js%20CI" alt="Build Status"></a>
|
|
10
14
|
<a href="https://www.npmjs.com/package/tailwindcss"><img src="https://img.shields.io/npm/dt/tailwindcss.svg" alt="Total Downloads"></a>
|
package/colors.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
let colors = require('./lib/public/colors')
|
|
2
|
+
module.exports = (colors.__esModule ? colors : { default: colors }).default
|
package/defaultConfig.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
let defaultConfig = require('./lib/public/default-config')
|
|
2
|
+
module.exports = (defaultConfig.__esModule ? defaultConfig : { default: defaultConfig }).default
|
package/defaultTheme.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
let defaultTheme = require('./lib/public/default-theme')
|
|
2
|
+
module.exports = (defaultTheme.__esModule ? defaultTheme : { default: defaultTheme }).default
|
package/lib/cli.js
CHANGED
|
@@ -15,13 +15,14 @@ var _fastGlob = _interopRequireDefault(require("fast-glob"));
|
|
|
15
15
|
var _getModuleDependencies = _interopRequireDefault(require("./lib/getModuleDependencies"));
|
|
16
16
|
var _log = _interopRequireDefault(require("./util/log"));
|
|
17
17
|
var _packageJson = _interopRequireDefault(require("../package.json"));
|
|
18
|
+
var _normalizePath = _interopRequireDefault(require("normalize-path"));
|
|
18
19
|
function _interopRequireDefault(obj) {
|
|
19
20
|
return obj && obj.__esModule ? obj : {
|
|
20
21
|
default: obj
|
|
21
22
|
};
|
|
22
23
|
}
|
|
23
24
|
let env = {
|
|
24
|
-
DEBUG: process.env.DEBUG !== undefined
|
|
25
|
+
DEBUG: process.env.DEBUG !== undefined && process.env.DEBUG !== '0'
|
|
25
26
|
};
|
|
26
27
|
// ---
|
|
27
28
|
function indentRecursive(node, indent = 0) {
|
|
@@ -39,7 +40,26 @@ function formatNodes(root) {
|
|
|
39
40
|
root.first.raws.before = '';
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
|
-
function
|
|
43
|
+
async function outputFile(file, contents) {
|
|
44
|
+
if (_fs.default.existsSync(file) && await _fs.default.promises.readFile(file, 'utf8') === contents) {
|
|
45
|
+
return; // Skip writing the file
|
|
46
|
+
}
|
|
47
|
+
// Write the file
|
|
48
|
+
await _fs.default.promises.writeFile(file, contents, 'utf8');
|
|
49
|
+
}
|
|
50
|
+
function drainStdin() {
|
|
51
|
+
return new Promise((resolve, reject)=>{
|
|
52
|
+
let result = '';
|
|
53
|
+
process.stdin.on('data', (chunk)=>{
|
|
54
|
+
result += chunk;
|
|
55
|
+
});
|
|
56
|
+
process.stdin.on('end', ()=>resolve(result)
|
|
57
|
+
);
|
|
58
|
+
process.stdin.on('error', (err)=>reject(err)
|
|
59
|
+
);
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
function help({ message , usage , commands: commands1 , options }) {
|
|
43
63
|
let indent = 2;
|
|
44
64
|
// Render header
|
|
45
65
|
console.log();
|
|
@@ -60,11 +80,11 @@ function help({ message , usage , commands , options }) {
|
|
|
60
80
|
}
|
|
61
81
|
}
|
|
62
82
|
// Render commands
|
|
63
|
-
if (
|
|
83
|
+
if (commands1 && commands1.length > 0) {
|
|
64
84
|
console.log();
|
|
65
85
|
console.log('Commands:');
|
|
66
|
-
for (let
|
|
67
|
-
console.log(' '.repeat(indent),
|
|
86
|
+
for (let command1 of commands1){
|
|
87
|
+
console.log(' '.repeat(indent), command1);
|
|
68
88
|
}
|
|
69
89
|
}
|
|
70
90
|
// Render options
|
|
@@ -85,12 +105,12 @@ function help({ message , usage , commands , options }) {
|
|
|
85
105
|
}
|
|
86
106
|
console.log();
|
|
87
107
|
console.log('Options:');
|
|
88
|
-
for (let { flags , description , deprecated } of Object.values(groupedOptions)){
|
|
108
|
+
for (let { flags: flags1 , description , deprecated } of Object.values(groupedOptions)){
|
|
89
109
|
if (deprecated) continue;
|
|
90
|
-
if (
|
|
91
|
-
console.log(' '.repeat(indent + 4 /* 4 = "-i, ".length */ ),
|
|
110
|
+
if (flags1.length === 1) {
|
|
111
|
+
console.log(' '.repeat(indent + 4 /* 4 = "-i, ".length */ ), flags1.slice().reverse().join(', ').padEnd(20, ' '), description);
|
|
92
112
|
} else {
|
|
93
|
-
console.log(' '.repeat(indent),
|
|
113
|
+
console.log(' '.repeat(indent), flags1.slice().reverse().join(', ').padEnd(24, ' '), description);
|
|
94
114
|
}
|
|
95
115
|
}
|
|
96
116
|
}
|
|
@@ -186,8 +206,8 @@ if (process.stdout.isTTY /* Detect redirecting output to a file */ && (process.
|
|
|
186
206
|
'tailwindcss [--input input.css] [--output output.css] [--watch] [options...]',
|
|
187
207
|
'tailwindcss init [--full] [--postcss] [options...]',
|
|
188
208
|
],
|
|
189
|
-
commands: Object.keys(commands).filter((
|
|
190
|
-
).map((
|
|
209
|
+
commands: Object.keys(commands).filter((command2)=>command2 !== 'build'
|
|
210
|
+
).map((command3)=>`${command3} [options]`
|
|
191
211
|
),
|
|
192
212
|
options: {
|
|
193
213
|
...commands.build.args,
|
|
@@ -209,8 +229,8 @@ if (commands[command] === undefined) {
|
|
|
209
229
|
usage: [
|
|
210
230
|
'tailwindcss <command> [options]'
|
|
211
231
|
],
|
|
212
|
-
commands: Object.keys(commands).filter((
|
|
213
|
-
).map((
|
|
232
|
+
commands: Object.keys(commands).filter((command4)=>command4 !== 'build'
|
|
233
|
+
).map((command5)=>`${command5} [options]`
|
|
214
234
|
),
|
|
215
235
|
options: sharedFlags
|
|
216
236
|
});
|
|
@@ -246,16 +266,16 @@ let args = (()=>{
|
|
|
246
266
|
handler = flags[handler];
|
|
247
267
|
}
|
|
248
268
|
if (!handler) continue;
|
|
249
|
-
let
|
|
269
|
+
let args1 = [];
|
|
250
270
|
let offset = i + 1;
|
|
251
271
|
// Parse args for current flag
|
|
252
272
|
while(result['_'][offset] && !result['_'][offset].startsWith('-')){
|
|
253
|
-
|
|
273
|
+
args1.push(result['_'][offset++]);
|
|
254
274
|
}
|
|
255
275
|
// Cleanup manually parsed flags + args
|
|
256
|
-
result['_'].splice(i, 1 +
|
|
276
|
+
result['_'].splice(i, 1 + args1.length);
|
|
257
277
|
// Set the resolved value in the `result` object
|
|
258
|
-
result[flagName] = handler.type(
|
|
278
|
+
result[flagName] = handler.type(args1.length === 0 ? undefined : args1.length === 1 ? args1[0] : args1, flagName);
|
|
259
279
|
}
|
|
260
280
|
// Ensure that the `command` is always the first argument in the `args`.
|
|
261
281
|
// This is important so that we don't have to check if a default command
|
|
@@ -335,7 +355,7 @@ async function build() {
|
|
|
335
355
|
console.error('[deprecation] Running tailwindcss without -i, please provide an input file.');
|
|
336
356
|
input = args['--input'] = args['_'][1];
|
|
337
357
|
}
|
|
338
|
-
if (input && !_fs.default.existsSync(input = _path.default.resolve(input))) {
|
|
358
|
+
if (input && input !== '-' && !_fs.default.existsSync(input = _path.default.resolve(input))) {
|
|
339
359
|
console.error(`Specified input file ${args['--input']} does not exist.`);
|
|
340
360
|
process.exit(9);
|
|
341
361
|
}
|
|
@@ -386,34 +406,30 @@ async function build() {
|
|
|
386
406
|
};
|
|
387
407
|
let resolvedConfig = (0, _resolveConfig).default(config);
|
|
388
408
|
if (args['--purge']) {
|
|
389
|
-
_log.default.warn([
|
|
409
|
+
_log.default.warn('purge-flag-deprecated', [
|
|
390
410
|
'The `--purge` flag has been deprecated.',
|
|
391
|
-
'Please use `--content` instead.'
|
|
411
|
+
'Please use `--content` instead.',
|
|
392
412
|
]);
|
|
393
413
|
if (!args['--content']) {
|
|
394
|
-
args['--content'] = [
|
|
395
|
-
'--purge'
|
|
396
|
-
];
|
|
414
|
+
args['--content'] = args['--purge'];
|
|
397
415
|
}
|
|
398
416
|
}
|
|
399
417
|
if (args['--content']) {
|
|
400
|
-
resolvedConfig.content = args['--content'].split(/(?<!{[^}]+),/);
|
|
418
|
+
resolvedConfig.content.files = args['--content'].split(/(?<!{[^}]+),/);
|
|
401
419
|
}
|
|
402
420
|
return resolvedConfig;
|
|
403
421
|
}
|
|
404
|
-
function extractContent(config) {
|
|
405
|
-
return config.content.content.concat(config.content.safelist);
|
|
406
|
-
}
|
|
407
422
|
function extractFileGlobs(config) {
|
|
408
|
-
return
|
|
423
|
+
return config.content.files.filter((file)=>{
|
|
409
424
|
// Strings in this case are files / globs. If it is something else,
|
|
410
425
|
// like an object it's probably a raw content object. But this object
|
|
411
426
|
// is not watchable, so let's remove it.
|
|
412
427
|
return typeof file === 'string';
|
|
413
|
-
})
|
|
428
|
+
}).map((glob)=>(0, _normalizePath).default(glob)
|
|
429
|
+
);
|
|
414
430
|
}
|
|
415
431
|
function extractRawContent(config) {
|
|
416
|
-
return
|
|
432
|
+
return config.content.files.filter((file)=>{
|
|
417
433
|
return typeof file === 'object' && file !== null;
|
|
418
434
|
});
|
|
419
435
|
}
|
|
@@ -425,7 +441,7 @@ async function build() {
|
|
|
425
441
|
for (let file of files){
|
|
426
442
|
changedContent.push({
|
|
427
443
|
content: _fs.default.readFileSync(_path.default.resolve(file), 'utf8'),
|
|
428
|
-
extension: _path.default.extname(file)
|
|
444
|
+
extension: _path.default.extname(file).slice(1)
|
|
429
445
|
});
|
|
430
446
|
}
|
|
431
447
|
// Resolve raw content in the tailwind config
|
|
@@ -502,10 +518,8 @@ async function build() {
|
|
|
502
518
|
return process.stdout.write(result.css);
|
|
503
519
|
}
|
|
504
520
|
return Promise.all([
|
|
505
|
-
|
|
506
|
-
),
|
|
507
|
-
result.map && _fs.default.writeFile(output + '.map', result.map.toString(), ()=>true
|
|
508
|
-
),
|
|
521
|
+
outputFile(output, result.css),
|
|
522
|
+
result.map && outputFile(output + '.map', result.map.toString()),
|
|
509
523
|
].filter(Boolean));
|
|
510
524
|
}).then(()=>{
|
|
511
525
|
let end = process.hrtime.bigint();
|
|
@@ -513,8 +527,19 @@ async function build() {
|
|
|
513
527
|
console.error('Done in', (end - start) / BigInt(1000000) + 'ms.');
|
|
514
528
|
});
|
|
515
529
|
}
|
|
516
|
-
let
|
|
517
|
-
|
|
530
|
+
let css1 = await (()=>{
|
|
531
|
+
// Piping in data, let's drain the stdin
|
|
532
|
+
if (input === '-') {
|
|
533
|
+
return drainStdin();
|
|
534
|
+
}
|
|
535
|
+
// Input file has been provided
|
|
536
|
+
if (input) {
|
|
537
|
+
return _fs.default.readFileSync(_path.default.resolve(input), 'utf8');
|
|
538
|
+
}
|
|
539
|
+
// No input file provided, fallback to default atrules
|
|
540
|
+
return '@tailwind base; @tailwind components; @tailwind utilities';
|
|
541
|
+
})();
|
|
542
|
+
return processCSS(css1);
|
|
518
543
|
}
|
|
519
544
|
let context = null;
|
|
520
545
|
async function startWatcher() {
|
|
@@ -524,8 +549,8 @@ async function build() {
|
|
|
524
549
|
let watcher = null;
|
|
525
550
|
function refreshConfig() {
|
|
526
551
|
env.DEBUG && console.time('Module dependencies');
|
|
527
|
-
for (let
|
|
528
|
-
delete require.cache[require.resolve(
|
|
552
|
+
for (let file1 of configDependencies){
|
|
553
|
+
delete require.cache[require.resolve(file1)];
|
|
529
554
|
}
|
|
530
555
|
if (configPath) {
|
|
531
556
|
configDependencies = (0, _getModuleDependencies).default(configPath).map(({ file })=>file
|
|
@@ -622,11 +647,9 @@ async function build() {
|
|
|
622
647
|
if (!output) {
|
|
623
648
|
return process.stdout.write(result.css);
|
|
624
649
|
}
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
),
|
|
628
|
-
result.map && _fs.default.writeFile(output + '.map', result.map.toString(), ()=>true
|
|
629
|
-
),
|
|
650
|
+
return Promise.all([
|
|
651
|
+
outputFile(output, result.css),
|
|
652
|
+
result.map && outputFile(output + '.map', result.map.toString()),
|
|
630
653
|
].filter(Boolean));
|
|
631
654
|
}).then(()=>{
|
|
632
655
|
let end = process.hrtime.bigint();
|
|
@@ -639,44 +662,59 @@ async function build() {
|
|
|
639
662
|
}
|
|
640
663
|
});
|
|
641
664
|
}
|
|
642
|
-
let
|
|
643
|
-
|
|
665
|
+
let css2 = await (()=>{
|
|
666
|
+
// Piping in data, let's drain the stdin
|
|
667
|
+
if (input === '-') {
|
|
668
|
+
return drainStdin();
|
|
669
|
+
}
|
|
670
|
+
// Input file has been provided
|
|
671
|
+
if (input) {
|
|
672
|
+
return _fs.default.readFileSync(_path.default.resolve(input), 'utf8');
|
|
673
|
+
}
|
|
674
|
+
// No input file provided, fallback to default atrules
|
|
675
|
+
return '@tailwind base; @tailwind components; @tailwind utilities';
|
|
676
|
+
})();
|
|
677
|
+
let result1 = await processCSS(css2);
|
|
644
678
|
env.DEBUG && console.timeEnd('Finished in');
|
|
645
679
|
return result1;
|
|
646
680
|
}
|
|
647
|
-
let
|
|
681
|
+
let config1 = refreshConfig(configPath);
|
|
648
682
|
if (input) {
|
|
649
683
|
contextDependencies.add(_path.default.resolve(input));
|
|
650
684
|
}
|
|
651
685
|
watcher = _chokidar.default.watch([
|
|
652
686
|
...contextDependencies,
|
|
653
|
-
...extractFileGlobs(
|
|
687
|
+
...extractFileGlobs(config1)
|
|
654
688
|
], {
|
|
655
|
-
ignoreInitial: true
|
|
689
|
+
ignoreInitial: true,
|
|
690
|
+
awaitWriteFinish: process.platform === 'win32' ? {
|
|
691
|
+
stabilityThreshold: 50,
|
|
692
|
+
pollInterval: 10
|
|
693
|
+
} : false
|
|
656
694
|
});
|
|
657
695
|
let chain = Promise.resolve();
|
|
658
696
|
watcher.on('change', async (file)=>{
|
|
659
697
|
if (contextDependencies.has(file)) {
|
|
660
698
|
env.DEBUG && console.time('Resolve config');
|
|
661
699
|
context = null;
|
|
662
|
-
|
|
700
|
+
config1 = refreshConfig(configPath);
|
|
663
701
|
env.DEBUG && console.timeEnd('Resolve config');
|
|
664
702
|
env.DEBUG && console.time('Watch new files');
|
|
665
|
-
let globs = extractFileGlobs(
|
|
703
|
+
let globs = extractFileGlobs(config1);
|
|
666
704
|
watcher.add(configDependencies);
|
|
667
705
|
watcher.add(globs);
|
|
668
706
|
env.DEBUG && console.timeEnd('Watch new files');
|
|
669
707
|
chain = chain.then(async ()=>{
|
|
670
|
-
changedContent.push(...getChangedContent(
|
|
671
|
-
await rebuild(
|
|
708
|
+
changedContent.push(...getChangedContent(config1));
|
|
709
|
+
await rebuild(config1);
|
|
672
710
|
});
|
|
673
711
|
} else {
|
|
674
712
|
chain = chain.then(async ()=>{
|
|
675
713
|
changedContent.push({
|
|
676
714
|
content: _fs.default.readFileSync(_path.default.resolve(file), 'utf8'),
|
|
677
|
-
extension: _path.default.extname(file)
|
|
715
|
+
extension: _path.default.extname(file).slice(1)
|
|
678
716
|
});
|
|
679
|
-
await rebuild(
|
|
717
|
+
await rebuild(config1);
|
|
680
718
|
});
|
|
681
719
|
}
|
|
682
720
|
});
|
|
@@ -684,14 +722,14 @@ async function build() {
|
|
|
684
722
|
chain = chain.then(async ()=>{
|
|
685
723
|
changedContent.push({
|
|
686
724
|
content: _fs.default.readFileSync(_path.default.resolve(file), 'utf8'),
|
|
687
|
-
extension: _path.default.extname(file)
|
|
725
|
+
extension: _path.default.extname(file).slice(1)
|
|
688
726
|
});
|
|
689
|
-
await rebuild(
|
|
727
|
+
await rebuild(config1);
|
|
690
728
|
});
|
|
691
729
|
});
|
|
692
730
|
chain = chain.then(()=>{
|
|
693
|
-
changedContent.push(...getChangedContent(
|
|
694
|
-
return rebuild(
|
|
731
|
+
changedContent.push(...getChangedContent(config1));
|
|
732
|
+
return rebuild(config1);
|
|
695
733
|
});
|
|
696
734
|
}
|
|
697
735
|
if (shouldWatch) {
|
package/lib/constants.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
exports.
|
|
5
|
+
exports.defaultPostCssConfigStubFile = exports.simpleConfigStubFile = exports.defaultConfigStubFile = exports.supportedPostCssConfigFile = exports.supportedConfigFiles = exports.cjsPostCssConfigFile = exports.cjsConfigFile = exports.defaultPostCssConfigFile = exports.defaultConfigFile = exports.cli = void 0;
|
|
6
6
|
var _path = _interopRequireDefault(require("path"));
|
|
7
7
|
function _interopRequireDefault(obj) {
|
|
8
8
|
return obj && obj.__esModule ? obj : {
|