tailwindcss 0.0.0-insiders.ca1dfd6 → 0.0.0-insiders.d07553b
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 +110 -1
- package/colors.js +2 -1
- package/defaultConfig.js +2 -1
- package/defaultTheme.js +2 -1
- package/lib/cli.js +47 -48
- package/lib/constants.js +1 -1
- package/lib/corePluginList.js +10 -1
- package/lib/corePlugins.js +425 -285
- package/lib/css/preflight.css +14 -1
- package/lib/featureFlags.js +14 -9
- package/lib/lib/collapseDuplicateDeclarations.js +29 -0
- package/lib/lib/detectNesting.js +17 -2
- package/lib/lib/evaluateTailwindFunctions.js +9 -5
- package/lib/lib/expandApplyAtRules.js +26 -9
- package/lib/lib/expandTailwindAtRules.js +16 -26
- package/lib/lib/generateRules.js +206 -27
- package/lib/lib/normalizeTailwindDirectives.js +3 -2
- package/lib/lib/resolveDefaultsAtRules.js +67 -56
- package/lib/lib/setupContextUtils.js +198 -186
- package/lib/lib/setupTrackingContext.js +3 -3
- package/lib/lib/setupWatchingContext.js +8 -4
- package/lib/lib/sharedState.js +2 -12
- package/lib/lib/substituteScreenAtRules.js +7 -4
- package/lib/processTailwindFeatures.js +4 -0
- package/lib/public/colors.js +4 -8
- package/lib/util/buildMediaQuery.js +13 -24
- package/lib/util/createUtilityPlugin.js +5 -5
- package/lib/util/dataTypes.js +38 -7
- package/lib/util/formatVariantSelector.js +186 -0
- package/lib/util/isValidArbitraryValue.js +64 -0
- package/lib/util/log.js +30 -18
- package/lib/util/nameClass.js +2 -1
- package/lib/util/negateValue.js +3 -1
- package/lib/util/normalizeConfig.js +208 -0
- package/lib/util/normalizeScreens.js +61 -0
- package/lib/util/parseBoxShadowValue.js +77 -0
- package/lib/util/pluginUtils.js +62 -158
- package/lib/util/prefixSelector.js +1 -3
- package/lib/util/resolveConfig.js +22 -81
- package/lib/util/transformThemeValue.js +23 -13
- package/package.json +15 -15
- package/peers/index.js +4495 -5499
- package/plugin.js +2 -1
- package/resolveConfig.js +2 -1
- package/scripts/create-plugin-list.js +2 -2
- package/src/cli.js +19 -13
- package/src/corePluginList.js +1 -1
- package/src/corePlugins.js +413 -422
- package/src/css/preflight.css +14 -1
- package/src/featureFlags.js +16 -6
- package/src/lib/collapseDuplicateDeclarations.js +28 -0
- package/src/lib/detectNesting.js +22 -3
- package/src/lib/evaluateTailwindFunctions.js +5 -2
- package/src/lib/expandApplyAtRules.js +29 -2
- package/src/lib/expandTailwindAtRules.js +17 -29
- package/src/lib/generateRules.js +228 -19
- package/src/lib/normalizeTailwindDirectives.js +3 -2
- package/src/lib/resolveDefaultsAtRules.js +67 -50
- package/src/lib/setupContextUtils.js +189 -163
- package/src/lib/setupTrackingContext.js +3 -5
- package/src/lib/setupWatchingContext.js +10 -5
- package/src/lib/sharedState.js +1 -4
- package/src/lib/substituteScreenAtRules.js +6 -3
- package/src/processTailwindFeatures.js +5 -0
- package/src/public/colors.js +4 -9
- package/src/util/buildMediaQuery.js +14 -18
- package/src/util/createUtilityPlugin.js +2 -2
- package/src/util/dataTypes.js +43 -11
- package/src/util/formatVariantSelector.js +196 -0
- package/src/util/isValidArbitraryValue.js +61 -0
- package/src/util/log.js +18 -21
- package/src/util/nameClass.js +2 -2
- package/src/util/negateValue.js +4 -2
- package/src/util/normalizeConfig.js +249 -0
- package/src/util/normalizeScreens.js +45 -0
- package/src/util/parseBoxShadowValue.js +71 -0
- package/src/util/pluginUtils.js +50 -146
- package/src/util/prefixSelector.js +1 -4
- package/src/util/resolveConfig.js +11 -64
- package/src/util/transformThemeValue.js +22 -7
- package/stubs/defaultConfig.stub.js +151 -91
- package/stubs/simpleConfig.stub.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,82 @@ 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.2] - 2021-12-13
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- Temporarily disable optimize univeral defaults ([#6461](https://github.com/tailwindlabs/tailwindcss/pull/6461))
|
|
17
|
+
|
|
18
|
+
## [3.0.1] - 2021-12-10
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- Ensure complex variants with multiple classes work ([#6311](https://github.com/tailwindlabs/tailwindcss/pull/6311))
|
|
23
|
+
- Re-add `default` interop to public available functions ([#6348](https://github.com/tailwindlabs/tailwindcss/pull/6348))
|
|
24
|
+
- Detect circular dependencies when using `@apply` ([#6365](https://github.com/tailwindlabs/tailwindcss/pull/6365))
|
|
25
|
+
- Fix defaults optimization when vendor prefixes are involved ([#6369](https://github.com/tailwindlabs/tailwindcss/pull/6369))
|
|
26
|
+
|
|
27
|
+
## [3.0.0] - 2021-12-09
|
|
28
|
+
|
|
29
|
+
### Fixed
|
|
30
|
+
|
|
31
|
+
- Enforce the order of some variants (like `before` and `after`) ([#6018](https://github.com/tailwindlabs/tailwindcss/pull/6018))
|
|
32
|
+
|
|
33
|
+
### Added
|
|
34
|
+
|
|
35
|
+
- Add `placeholder` variant ([#6106](https://github.com/tailwindlabs/tailwindcss/pull/6106))
|
|
36
|
+
- Add composable `touch-action` utilities ([#6115](https://github.com/tailwindlabs/tailwindcss/pull/6115))
|
|
37
|
+
- Add support for "arbitrary properties" ([#6161](https://github.com/tailwindlabs/tailwindcss/pull/6161))
|
|
38
|
+
- Add `portrait` and `landscape` variants ([#6046](https://github.com/tailwindlabs/tailwindcss/pull/6046))
|
|
39
|
+
- Add `text-decoration-style`, `text-decoration-thickness`, and `text-underline-offset` utilities ([#6004](https://github.com/tailwindlabs/tailwindcss/pull/6004))
|
|
40
|
+
- Add `menu` reset to preflight ([#6213](https://github.com/tailwindlabs/tailwindcss/pull/6213))
|
|
41
|
+
- Allow `0` as a valid `length` value ([#6233](https://github.com/tailwindlabs/tailwindcss/pull/6233), [#6259](https://github.com/tailwindlabs/tailwindcss/pull/6259))
|
|
42
|
+
- Add CSS functions to data types ([#6258](https://github.com/tailwindlabs/tailwindcss/pull/6258))
|
|
43
|
+
- Support negative values for `scale-*` utilities ([c48e629](https://github.com/tailwindlabs/tailwindcss/commit/c48e629955585ad18dadba9f470fda59cc448ab7))
|
|
44
|
+
- Improve `length` data type, by validating each value individually ([#6283](https://github.com/tailwindlabs/tailwindcss/pull/6283))
|
|
45
|
+
|
|
46
|
+
### Changed
|
|
47
|
+
|
|
48
|
+
- 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))
|
|
49
|
+
|
|
50
|
+
## [3.0.0-alpha.2] - 2021-11-08
|
|
51
|
+
|
|
52
|
+
### Changed
|
|
53
|
+
|
|
54
|
+
- Don't use pointer cursor on disabled buttons by default ([#5772](https://github.com/tailwindlabs/tailwindcss/pull/5772))
|
|
55
|
+
- Set default content value in preflight instead of within each before/after utility ([#5820](https://github.com/tailwindlabs/tailwindcss/pull/5820))
|
|
56
|
+
- Remove `prefix` as a function ([#5829](https://github.com/tailwindlabs/tailwindcss/pull/5829))
|
|
57
|
+
|
|
58
|
+
### Added
|
|
59
|
+
|
|
60
|
+
- Add `flex-basis` utilities ([#5671](https://github.com/tailwindlabs/tailwindcss/pull/5671))
|
|
61
|
+
- Make negative values a first-class feature ([#5709](https://github.com/tailwindlabs/tailwindcss/pull/5709))
|
|
62
|
+
- Add `fit-content` values for `min/max-width/height` utilities ([#5638](https://github.com/tailwindlabs/tailwindcss/pull/5638))
|
|
63
|
+
- Add `min/max-content` values for `min/max-height` utilities ([#5729](https://github.com/tailwindlabs/tailwindcss/pull/5729))
|
|
64
|
+
- Add all standard `cursor-*` values by default ([#5734](https://github.com/tailwindlabs/tailwindcss/pull/5734))
|
|
65
|
+
- Add `grow-*` and `shrink-*` utilities, deprecate `flex-grow-*` and `flex-shrink-*` ([#5733](https://github.com/tailwindlabs/tailwindcss/pull/5733))
|
|
66
|
+
- Add `text-decoration-color` utilities ([#5760](https://github.com/tailwindlabs/tailwindcss/pull/5760))
|
|
67
|
+
- Add new declarative `addVariant` API ([#5809](https://github.com/tailwindlabs/tailwindcss/pull/5809))
|
|
68
|
+
- Add first-class `print` variant for targeting printed media ([#5885](https://github.com/tailwindlabs/tailwindcss/pull/5885))
|
|
69
|
+
- Add `outline-style`, `outline-color`, `outline-width` and `outline-offset` utilities ([#5887](https://github.com/tailwindlabs/tailwindcss/pull/5887))
|
|
70
|
+
- Add full color palette for `fill-*` and `stroke-*` utilities (#5933[](https://github.com/tailwindlabs/tailwindcss/pull/5933))
|
|
71
|
+
- Add composable API for colored box shadows ([#5979](https://github.com/tailwindlabs/tailwindcss/pull/5979))
|
|
72
|
+
|
|
73
|
+
### Fixed
|
|
74
|
+
|
|
75
|
+
- Configure chokidar's `awaitWriteFinish` setting to avoid occasional stale builds on Windows ([#5774](https://github.com/tailwindlabs/tailwindcss/pull/5774))
|
|
76
|
+
- Fix CLI `--content` option ([#5775](https://github.com/tailwindlabs/tailwindcss/pull/5775))
|
|
77
|
+
- Fix before/after utilities overriding custom content values at larger breakpoints ([#5820](https://github.com/tailwindlabs/tailwindcss/pull/5820))
|
|
78
|
+
- Cleanup duplicate properties ([#5830](https://github.com/tailwindlabs/tailwindcss/pull/5830))
|
|
79
|
+
- Allow `_` inside `url()` when using arbitrary values ([#5853](https://github.com/tailwindlabs/tailwindcss/pull/5853))
|
|
80
|
+
- Prevent crashes when using comments in `@layer` AtRules ([#5854](https://github.com/tailwindlabs/tailwindcss/pull/5854))
|
|
81
|
+
- 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))
|
|
82
|
+
- Ensure `@apply`-ing a utility with multiple definitions works ([#5870](https://github.com/tailwindlabs/tailwindcss/pull/5870))
|
|
83
|
+
|
|
84
|
+
## [3.0.0-alpha.1] - 2021-10-01
|
|
85
|
+
|
|
10
86
|
### Changed
|
|
11
87
|
|
|
12
88
|
- Remove AOT engine, make JIT the default ([#5340](https://github.com/tailwindlabs/tailwindcss/pull/5340))
|
|
@@ -21,15 +97,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
21
97
|
- Add native `aspect-ratio` utilities ([#5359](https://github.com/tailwindlabs/tailwindcss/pull/5359))
|
|
22
98
|
- Unify config callback helpers into single object ([#5382](https://github.com/tailwindlabs/tailwindcss/pull/5382))
|
|
23
99
|
- Preserve original color format when adding opacity whenever possible ([#5154](https://github.com/tailwindlabs/tailwindcss/pull/5154))
|
|
100
|
+
- Add `accent-color` utilities ([#5387](https://github.com/tailwindlabs/tailwindcss/pull/5387))
|
|
24
101
|
- Add `scroll-behavior` utilities ([#5388](https://github.com/tailwindlabs/tailwindcss/pull/5388))
|
|
102
|
+
- Add `will-change` utilities ([#5448](https://github.com/tailwindlabs/tailwindcss/pull/5448))
|
|
103
|
+
- Add `text-indent` utilities ([#5449](https://github.com/tailwindlabs/tailwindcss/pull/5449))
|
|
104
|
+
- Add `column` utilities ([#5457](https://github.com/tailwindlabs/tailwindcss/pull/5457))
|
|
25
105
|
- Add `border-hidden` utility ([#5485](https://github.com/tailwindlabs/tailwindcss/pull/5485))
|
|
26
106
|
- Add `align-sub` and `align-super` utilities by default ([#5486](https://github.com/tailwindlabs/tailwindcss/pull/5486))
|
|
27
107
|
- Add `break-before`, `break-inside` and `break-after` utilities ([#5530](https://github.com/tailwindlabs/tailwindcss/pull/5530))
|
|
28
108
|
- Add `file` variant for `::file-selector-button` pseudo element ([#4936](https://github.com/tailwindlabs/tailwindcss/pull/4936))
|
|
109
|
+
- Add comprehensive arbitrary value support ([#5568](https://github.com/tailwindlabs/tailwindcss/pull/5568))
|
|
29
110
|
- Add `touch-action` utilities ([#5603](https://github.com/tailwindlabs/tailwindcss/pull/5603))
|
|
30
111
|
- Add `inherit` to default color palette ([#5597](https://github.com/tailwindlabs/tailwindcss/pull/5597))
|
|
31
112
|
- Add `overflow-clip`, `overflow-x-clip` and `overflow-y-clip` utilities ([#5630](https://github.com/tailwindlabs/tailwindcss/pull/5630))
|
|
113
|
+
- Add `[open]` variant ([#5627](https://github.com/tailwindlabs/tailwindcss/pull/5627))
|
|
32
114
|
- Add `scroll-snap` utilities ([#5637](https://github.com/tailwindlabs/tailwindcss/pull/5637))
|
|
115
|
+
- Add `border-x` and `border-y` width and color utilities ([#5639](https://github.com/tailwindlabs/tailwindcss/pull/5639))
|
|
33
116
|
|
|
34
117
|
### Fixed
|
|
35
118
|
|
|
@@ -37,6 +120,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
37
120
|
- Fix using negated `content` globs ([#5625](https://github.com/tailwindlabs/tailwindcss/pull/5625))
|
|
38
121
|
- Fix using backslashes in `content` globs ([#5628](https://github.com/tailwindlabs/tailwindcss/pull/5628))
|
|
39
122
|
|
|
123
|
+
## [2.2.19] - 2021-10-29
|
|
124
|
+
|
|
125
|
+
### Fixed
|
|
126
|
+
|
|
127
|
+
- Ensure `corePlugins` order is consisent in AOT mode ([#5928](https://github.com/tailwindlabs/tailwindcss/pull/5928))
|
|
128
|
+
|
|
129
|
+
## [2.2.18] - 2021-10-29
|
|
130
|
+
|
|
131
|
+
### Fixed
|
|
132
|
+
|
|
133
|
+
- Bump versions for security vulnerabilities ([#5924](https://github.com/tailwindlabs/tailwindcss/pull/5924))
|
|
134
|
+
|
|
135
|
+
## [2.2.17] - 2021-10-13
|
|
136
|
+
|
|
137
|
+
### Fixed
|
|
138
|
+
|
|
139
|
+
- Configure chokidar's `awaitWriteFinish` setting to avoid occasional stale builds on Windows ([#5758](https://github.com/tailwindlabs/tailwindcss/pull/5758))
|
|
140
|
+
|
|
40
141
|
## [2.2.16] - 2021-09-26
|
|
41
142
|
|
|
42
143
|
### Fixed
|
|
@@ -1595,7 +1696,15 @@ No release notes
|
|
|
1595
1696
|
|
|
1596
1697
|
- Everything!
|
|
1597
1698
|
|
|
1598
|
-
[unreleased]: https://github.com/tailwindlabs/tailwindcss/compare/
|
|
1699
|
+
[unreleased]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.2...HEAD
|
|
1700
|
+
[3.0.2]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.1...v3.0.2
|
|
1701
|
+
[3.0.1]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.0...v3.0.1
|
|
1702
|
+
[3.0.0]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.0-alpha.2...v3.0.0
|
|
1703
|
+
[3.0.0-alpha.2]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.0-alpha.1...v3.0.0-alpha.2
|
|
1704
|
+
[3.0.0-alpha.1]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.19...v3.0.0-alpha.1
|
|
1705
|
+
[2.2.19]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.18...v2.2.19
|
|
1706
|
+
[2.2.18]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.17...v2.2.18
|
|
1707
|
+
[2.2.17]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.16...v2.2.17
|
|
1599
1708
|
[2.2.16]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.15...v2.2.16
|
|
1600
1709
|
[2.2.15]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.14...v2.2.15
|
|
1601
1710
|
[2.2.14]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.13...v2.2.14
|
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
|
@@ -22,7 +22,7 @@ function _interopRequireDefault(obj) {
|
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
24
|
let env = {
|
|
25
|
-
DEBUG: process.env.DEBUG !== undefined
|
|
25
|
+
DEBUG: process.env.DEBUG !== undefined && process.env.DEBUG !== '0'
|
|
26
26
|
};
|
|
27
27
|
// ---
|
|
28
28
|
function indentRecursive(node, indent = 0) {
|
|
@@ -40,7 +40,7 @@ function formatNodes(root) {
|
|
|
40
40
|
root.first.raws.before = '';
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
function help({ message , usage , commands , options }) {
|
|
43
|
+
function help({ message , usage , commands: commands1 , options }) {
|
|
44
44
|
let indent = 2;
|
|
45
45
|
// Render header
|
|
46
46
|
console.log();
|
|
@@ -61,11 +61,11 @@ function help({ message , usage , commands , options }) {
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
// Render commands
|
|
64
|
-
if (
|
|
64
|
+
if (commands1 && commands1.length > 0) {
|
|
65
65
|
console.log();
|
|
66
66
|
console.log('Commands:');
|
|
67
|
-
for (let
|
|
68
|
-
console.log(' '.repeat(indent),
|
|
67
|
+
for (let command1 of commands1){
|
|
68
|
+
console.log(' '.repeat(indent), command1);
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
// Render options
|
|
@@ -86,12 +86,12 @@ function help({ message , usage , commands , options }) {
|
|
|
86
86
|
}
|
|
87
87
|
console.log();
|
|
88
88
|
console.log('Options:');
|
|
89
|
-
for (let { flags , description , deprecated } of Object.values(groupedOptions)){
|
|
89
|
+
for (let { flags: flags1 , description , deprecated } of Object.values(groupedOptions)){
|
|
90
90
|
if (deprecated) continue;
|
|
91
|
-
if (
|
|
92
|
-
console.log(' '.repeat(indent + 4 /* 4 = "-i, ".length */ ),
|
|
91
|
+
if (flags1.length === 1) {
|
|
92
|
+
console.log(' '.repeat(indent + 4 /* 4 = "-i, ".length */ ), flags1.slice().reverse().join(', ').padEnd(20, ' '), description);
|
|
93
93
|
} else {
|
|
94
|
-
console.log(' '.repeat(indent),
|
|
94
|
+
console.log(' '.repeat(indent), flags1.slice().reverse().join(', ').padEnd(24, ' '), description);
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
}
|
|
@@ -187,8 +187,8 @@ if (process.stdout.isTTY /* Detect redirecting output to a file */ && (process.
|
|
|
187
187
|
'tailwindcss [--input input.css] [--output output.css] [--watch] [options...]',
|
|
188
188
|
'tailwindcss init [--full] [--postcss] [options...]',
|
|
189
189
|
],
|
|
190
|
-
commands: Object.keys(commands).filter((
|
|
191
|
-
).map((
|
|
190
|
+
commands: Object.keys(commands).filter((command2)=>command2 !== 'build'
|
|
191
|
+
).map((command3)=>`${command3} [options]`
|
|
192
192
|
),
|
|
193
193
|
options: {
|
|
194
194
|
...commands.build.args,
|
|
@@ -210,8 +210,8 @@ if (commands[command] === undefined) {
|
|
|
210
210
|
usage: [
|
|
211
211
|
'tailwindcss <command> [options]'
|
|
212
212
|
],
|
|
213
|
-
commands: Object.keys(commands).filter((
|
|
214
|
-
).map((
|
|
213
|
+
commands: Object.keys(commands).filter((command4)=>command4 !== 'build'
|
|
214
|
+
).map((command5)=>`${command5} [options]`
|
|
215
215
|
),
|
|
216
216
|
options: sharedFlags
|
|
217
217
|
});
|
|
@@ -247,16 +247,16 @@ let args = (()=>{
|
|
|
247
247
|
handler = flags[handler];
|
|
248
248
|
}
|
|
249
249
|
if (!handler) continue;
|
|
250
|
-
let
|
|
250
|
+
let args1 = [];
|
|
251
251
|
let offset = i + 1;
|
|
252
252
|
// Parse args for current flag
|
|
253
253
|
while(result['_'][offset] && !result['_'][offset].startsWith('-')){
|
|
254
|
-
|
|
254
|
+
args1.push(result['_'][offset++]);
|
|
255
255
|
}
|
|
256
256
|
// Cleanup manually parsed flags + args
|
|
257
|
-
result['_'].splice(i, 1 +
|
|
257
|
+
result['_'].splice(i, 1 + args1.length);
|
|
258
258
|
// Set the resolved value in the `result` object
|
|
259
|
-
result[flagName] = handler.type(
|
|
259
|
+
result[flagName] = handler.type(args1.length === 0 ? undefined : args1.length === 1 ? args1[0] : args1, flagName);
|
|
260
260
|
}
|
|
261
261
|
// Ensure that the `command` is always the first argument in the `args`.
|
|
262
262
|
// This is important so that we don't have to check if a default command
|
|
@@ -387,26 +387,21 @@ async function build() {
|
|
|
387
387
|
};
|
|
388
388
|
let resolvedConfig = (0, _resolveConfig).default(config);
|
|
389
389
|
if (args['--purge']) {
|
|
390
|
-
_log.default.warn([
|
|
390
|
+
_log.default.warn('purge-flag-deprecated', [
|
|
391
391
|
'The `--purge` flag has been deprecated.',
|
|
392
|
-
'Please use `--content` instead.'
|
|
392
|
+
'Please use `--content` instead.',
|
|
393
393
|
]);
|
|
394
394
|
if (!args['--content']) {
|
|
395
|
-
args['--content'] = [
|
|
396
|
-
'--purge'
|
|
397
|
-
];
|
|
395
|
+
args['--content'] = args['--purge'];
|
|
398
396
|
}
|
|
399
397
|
}
|
|
400
398
|
if (args['--content']) {
|
|
401
|
-
resolvedConfig.content = args['--content'].split(/(?<!{[^}]+),/);
|
|
399
|
+
resolvedConfig.content.files = args['--content'].split(/(?<!{[^}]+),/);
|
|
402
400
|
}
|
|
403
401
|
return resolvedConfig;
|
|
404
402
|
}
|
|
405
|
-
function extractContent(config) {
|
|
406
|
-
return config.content.content.concat(config.content.safelist);
|
|
407
|
-
}
|
|
408
403
|
function extractFileGlobs(config) {
|
|
409
|
-
return
|
|
404
|
+
return config.content.files.filter((file)=>{
|
|
410
405
|
// Strings in this case are files / globs. If it is something else,
|
|
411
406
|
// like an object it's probably a raw content object. But this object
|
|
412
407
|
// is not watchable, so let's remove it.
|
|
@@ -415,7 +410,7 @@ async function build() {
|
|
|
415
410
|
);
|
|
416
411
|
}
|
|
417
412
|
function extractRawContent(config) {
|
|
418
|
-
return
|
|
413
|
+
return config.content.files.filter((file)=>{
|
|
419
414
|
return typeof file === 'object' && file !== null;
|
|
420
415
|
});
|
|
421
416
|
}
|
|
@@ -427,7 +422,7 @@ async function build() {
|
|
|
427
422
|
for (let file of files){
|
|
428
423
|
changedContent.push({
|
|
429
424
|
content: _fs.default.readFileSync(_path.default.resolve(file), 'utf8'),
|
|
430
|
-
extension: _path.default.extname(file)
|
|
425
|
+
extension: _path.default.extname(file).slice(1)
|
|
431
426
|
});
|
|
432
427
|
}
|
|
433
428
|
// Resolve raw content in the tailwind config
|
|
@@ -515,8 +510,8 @@ async function build() {
|
|
|
515
510
|
console.error('Done in', (end - start) / BigInt(1000000) + 'ms.');
|
|
516
511
|
});
|
|
517
512
|
}
|
|
518
|
-
let
|
|
519
|
-
return processCSS(
|
|
513
|
+
let css1 = input ? _fs.default.readFileSync(_path.default.resolve(input), 'utf8') : '@tailwind base; @tailwind components; @tailwind utilities';
|
|
514
|
+
return processCSS(css1);
|
|
520
515
|
}
|
|
521
516
|
let context = null;
|
|
522
517
|
async function startWatcher() {
|
|
@@ -526,8 +521,8 @@ async function build() {
|
|
|
526
521
|
let watcher = null;
|
|
527
522
|
function refreshConfig() {
|
|
528
523
|
env.DEBUG && console.time('Module dependencies');
|
|
529
|
-
for (let
|
|
530
|
-
delete require.cache[require.resolve(
|
|
524
|
+
for (let file1 of configDependencies){
|
|
525
|
+
delete require.cache[require.resolve(file1)];
|
|
531
526
|
}
|
|
532
527
|
if (configPath) {
|
|
533
528
|
configDependencies = (0, _getModuleDependencies).default(configPath).map(({ file })=>file
|
|
@@ -641,44 +636,48 @@ async function build() {
|
|
|
641
636
|
}
|
|
642
637
|
});
|
|
643
638
|
}
|
|
644
|
-
let
|
|
645
|
-
let result1 = await processCSS(
|
|
639
|
+
let css2 = input ? _fs.default.readFileSync(_path.default.resolve(input), 'utf8') : '@tailwind base; @tailwind components; @tailwind utilities';
|
|
640
|
+
let result1 = await processCSS(css2);
|
|
646
641
|
env.DEBUG && console.timeEnd('Finished in');
|
|
647
642
|
return result1;
|
|
648
643
|
}
|
|
649
|
-
let
|
|
644
|
+
let config1 = refreshConfig(configPath);
|
|
650
645
|
if (input) {
|
|
651
646
|
contextDependencies.add(_path.default.resolve(input));
|
|
652
647
|
}
|
|
653
648
|
watcher = _chokidar.default.watch([
|
|
654
649
|
...contextDependencies,
|
|
655
|
-
...extractFileGlobs(
|
|
650
|
+
...extractFileGlobs(config1)
|
|
656
651
|
], {
|
|
657
|
-
ignoreInitial: true
|
|
652
|
+
ignoreInitial: true,
|
|
653
|
+
awaitWriteFinish: process.platform === 'win32' ? {
|
|
654
|
+
stabilityThreshold: 50,
|
|
655
|
+
pollInterval: 10
|
|
656
|
+
} : false
|
|
658
657
|
});
|
|
659
658
|
let chain = Promise.resolve();
|
|
660
659
|
watcher.on('change', async (file)=>{
|
|
661
660
|
if (contextDependencies.has(file)) {
|
|
662
661
|
env.DEBUG && console.time('Resolve config');
|
|
663
662
|
context = null;
|
|
664
|
-
|
|
663
|
+
config1 = refreshConfig(configPath);
|
|
665
664
|
env.DEBUG && console.timeEnd('Resolve config');
|
|
666
665
|
env.DEBUG && console.time('Watch new files');
|
|
667
|
-
let globs = extractFileGlobs(
|
|
666
|
+
let globs = extractFileGlobs(config1);
|
|
668
667
|
watcher.add(configDependencies);
|
|
669
668
|
watcher.add(globs);
|
|
670
669
|
env.DEBUG && console.timeEnd('Watch new files');
|
|
671
670
|
chain = chain.then(async ()=>{
|
|
672
|
-
changedContent.push(...getChangedContent(
|
|
673
|
-
await rebuild(
|
|
671
|
+
changedContent.push(...getChangedContent(config1));
|
|
672
|
+
await rebuild(config1);
|
|
674
673
|
});
|
|
675
674
|
} else {
|
|
676
675
|
chain = chain.then(async ()=>{
|
|
677
676
|
changedContent.push({
|
|
678
677
|
content: _fs.default.readFileSync(_path.default.resolve(file), 'utf8'),
|
|
679
|
-
extension: _path.default.extname(file)
|
|
678
|
+
extension: _path.default.extname(file).slice(1)
|
|
680
679
|
});
|
|
681
|
-
await rebuild(
|
|
680
|
+
await rebuild(config1);
|
|
682
681
|
});
|
|
683
682
|
}
|
|
684
683
|
});
|
|
@@ -686,14 +685,14 @@ async function build() {
|
|
|
686
685
|
chain = chain.then(async ()=>{
|
|
687
686
|
changedContent.push({
|
|
688
687
|
content: _fs.default.readFileSync(_path.default.resolve(file), 'utf8'),
|
|
689
|
-
extension: _path.default.extname(file)
|
|
688
|
+
extension: _path.default.extname(file).slice(1)
|
|
690
689
|
});
|
|
691
|
-
await rebuild(
|
|
690
|
+
await rebuild(config1);
|
|
692
691
|
});
|
|
693
692
|
});
|
|
694
693
|
chain = chain.then(()=>{
|
|
695
|
-
changedContent.push(...getChangedContent(
|
|
696
|
-
return rebuild(
|
|
694
|
+
changedContent.push(...getChangedContent(config1));
|
|
695
|
+
return rebuild(config1);
|
|
697
696
|
});
|
|
698
697
|
}
|
|
699
698
|
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 : {
|
package/lib/corePluginList.js
CHANGED
|
@@ -35,6 +35,7 @@ var _default = [
|
|
|
35
35
|
"flex",
|
|
36
36
|
"flexShrink",
|
|
37
37
|
"flexGrow",
|
|
38
|
+
"flexBasis",
|
|
38
39
|
"tableLayout",
|
|
39
40
|
"borderCollapse",
|
|
40
41
|
"transformOrigin",
|
|
@@ -124,6 +125,10 @@ var _default = [
|
|
|
124
125
|
"textColor",
|
|
125
126
|
"textOpacity",
|
|
126
127
|
"textDecoration",
|
|
128
|
+
"textDecorationColor",
|
|
129
|
+
"textDecorationStyle",
|
|
130
|
+
"textDecorationThickness",
|
|
131
|
+
"textUnderlineOffset",
|
|
127
132
|
"fontSmoothing",
|
|
128
133
|
"placeholderColor",
|
|
129
134
|
"placeholderOpacity",
|
|
@@ -133,7 +138,11 @@ var _default = [
|
|
|
133
138
|
"backgroundBlendMode",
|
|
134
139
|
"mixBlendMode",
|
|
135
140
|
"boxShadow",
|
|
136
|
-
"
|
|
141
|
+
"boxShadowColor",
|
|
142
|
+
"outlineStyle",
|
|
143
|
+
"outlineWidth",
|
|
144
|
+
"outlineOffset",
|
|
145
|
+
"outlineColor",
|
|
137
146
|
"ringWidth",
|
|
138
147
|
"ringColor",
|
|
139
148
|
"ringOpacity",
|