tailwindcss 3.0.0-alpha.2 → 3.0.3
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 +59 -2
- package/colors.js +2 -1
- package/defaultConfig.js +2 -1
- package/defaultTheme.js +2 -1
- package/lib/cli.js +58 -58
- package/lib/corePluginList.js +3 -0
- package/lib/corePlugins.js +227 -172
- package/lib/css/preflight.css +5 -3
- package/lib/featureFlags.js +3 -1
- package/lib/lib/detectNesting.js +17 -2
- package/lib/lib/evaluateTailwindFunctions.js +6 -2
- package/lib/lib/expandApplyAtRules.js +23 -6
- package/lib/lib/expandTailwindAtRules.js +19 -1
- package/lib/lib/generateRules.js +54 -0
- package/lib/lib/resolveDefaultsAtRules.js +23 -9
- package/lib/lib/setupContextUtils.js +48 -71
- package/lib/lib/substituteScreenAtRules.js +7 -4
- package/lib/util/buildMediaQuery.js +13 -24
- package/lib/util/dataTypes.js +14 -3
- package/lib/util/defaults.js +6 -0
- package/lib/util/formatVariantSelector.js +88 -4
- package/lib/util/isValidArbitraryValue.js +64 -0
- package/lib/util/log.js +4 -0
- package/lib/util/nameClass.js +1 -0
- package/lib/util/normalizeConfig.js +34 -5
- package/lib/util/normalizeScreens.js +61 -0
- package/lib/util/resolveConfig.js +8 -8
- package/package.json +14 -13
- package/peers/index.js +3739 -3027
- package/plugin.js +2 -1
- package/resolveConfig.js +2 -1
- package/src/corePluginList.js +1 -1
- package/src/corePlugins.js +205 -165
- package/src/css/preflight.css +5 -3
- package/src/featureFlags.js +5 -1
- 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 +18 -0
- package/src/lib/generateRules.js +57 -0
- package/src/lib/resolveDefaultsAtRules.js +28 -7
- package/src/lib/setupContextUtils.js +45 -64
- package/src/lib/substituteScreenAtRules.js +6 -3
- package/src/util/buildMediaQuery.js +14 -18
- package/src/util/dataTypes.js +11 -6
- package/src/util/defaults.js +6 -0
- package/src/util/formatVariantSelector.js +92 -1
- package/src/util/isValidArbitraryValue.js +61 -0
- package/src/util/log.js +4 -0
- package/src/util/nameClass.js +1 -1
- package/src/util/normalizeConfig.js +14 -1
- package/src/util/normalizeScreens.js +45 -0
- package/stubs/defaultConfig.stub.js +17 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,7 +7,59 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
-
Nothing yet!
|
|
10
|
+
- Nothing yet!
|
|
11
|
+
|
|
12
|
+
## [3.0.3] - 2021-12-15
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- Warn about invalid globs in `content` ([#6449](https://github.com/tailwindlabs/tailwindcss/pull/6449))
|
|
17
|
+
- Add standalone tailwindcss CLI ([#6506](https://github.com/tailwindlabs/tailwindcss/pull/6506))
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
|
|
21
|
+
- Don't output unparsable values ([#6469](https://github.com/tailwindlabs/tailwindcss/pull/6469))
|
|
22
|
+
- 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))
|
|
23
|
+
- Move defaults to their own always-on layer ([#6500](https://github.com/tailwindlabs/tailwindcss/pull/6500))
|
|
24
|
+
- Support negative values in safelist patterns ([6480](https://github.com/tailwindlabs/tailwindcss/pull/6480))
|
|
25
|
+
|
|
26
|
+
## [3.0.2] - 2021-12-13
|
|
27
|
+
|
|
28
|
+
### Fixed
|
|
29
|
+
|
|
30
|
+
- 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))
|
|
31
|
+
|
|
32
|
+
## [3.0.1] - 2021-12-10
|
|
33
|
+
|
|
34
|
+
### Fixed
|
|
35
|
+
|
|
36
|
+
- Ensure complex variants with multiple classes work ([#6311](https://github.com/tailwindlabs/tailwindcss/pull/6311))
|
|
37
|
+
- Re-add `default` interop to public available functions ([#6348](https://github.com/tailwindlabs/tailwindcss/pull/6348))
|
|
38
|
+
- Detect circular dependencies when using `@apply` ([#6365](https://github.com/tailwindlabs/tailwindcss/pull/6365))
|
|
39
|
+
- Fix defaults optimization when vendor prefixes are involved ([#6369](https://github.com/tailwindlabs/tailwindcss/pull/6369))
|
|
40
|
+
|
|
41
|
+
## [3.0.0] - 2021-12-09
|
|
42
|
+
|
|
43
|
+
### Fixed
|
|
44
|
+
|
|
45
|
+
- Enforce the order of some variants (like `before` and `after`) ([#6018](https://github.com/tailwindlabs/tailwindcss/pull/6018))
|
|
46
|
+
|
|
47
|
+
### Added
|
|
48
|
+
|
|
49
|
+
- Add `placeholder` variant ([#6106](https://github.com/tailwindlabs/tailwindcss/pull/6106))
|
|
50
|
+
- Add composable `touch-action` utilities ([#6115](https://github.com/tailwindlabs/tailwindcss/pull/6115))
|
|
51
|
+
- Add support for "arbitrary properties" ([#6161](https://github.com/tailwindlabs/tailwindcss/pull/6161))
|
|
52
|
+
- Add `portrait` and `landscape` variants ([#6046](https://github.com/tailwindlabs/tailwindcss/pull/6046))
|
|
53
|
+
- Add `text-decoration-style`, `text-decoration-thickness`, and `text-underline-offset` utilities ([#6004](https://github.com/tailwindlabs/tailwindcss/pull/6004))
|
|
54
|
+
- Add `menu` reset to preflight ([#6213](https://github.com/tailwindlabs/tailwindcss/pull/6213))
|
|
55
|
+
- Allow `0` as a valid `length` value ([#6233](https://github.com/tailwindlabs/tailwindcss/pull/6233), [#6259](https://github.com/tailwindlabs/tailwindcss/pull/6259))
|
|
56
|
+
- Add CSS functions to data types ([#6258](https://github.com/tailwindlabs/tailwindcss/pull/6258))
|
|
57
|
+
- Support negative values for `scale-*` utilities ([c48e629](https://github.com/tailwindlabs/tailwindcss/commit/c48e629955585ad18dadba9f470fda59cc448ab7))
|
|
58
|
+
- Improve `length` data type, by validating each value individually ([#6283](https://github.com/tailwindlabs/tailwindcss/pull/6283))
|
|
59
|
+
|
|
60
|
+
### Changed
|
|
61
|
+
|
|
62
|
+
- 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))
|
|
11
63
|
|
|
12
64
|
## [3.0.0-alpha.2] - 2021-11-08
|
|
13
65
|
|
|
@@ -28,6 +80,7 @@ Nothing yet!
|
|
|
28
80
|
- Add `text-decoration-color` utilities ([#5760](https://github.com/tailwindlabs/tailwindcss/pull/5760))
|
|
29
81
|
- Add new declarative `addVariant` API ([#5809](https://github.com/tailwindlabs/tailwindcss/pull/5809))
|
|
30
82
|
- Add first-class `print` variant for targeting printed media ([#5885](https://github.com/tailwindlabs/tailwindcss/pull/5885))
|
|
83
|
+
- Add `outline-style`, `outline-color`, `outline-width` and `outline-offset` utilities ([#5887](https://github.com/tailwindlabs/tailwindcss/pull/5887))
|
|
31
84
|
- Add full color palette for `fill-*` and `stroke-*` utilities (#5933[](https://github.com/tailwindlabs/tailwindcss/pull/5933))
|
|
32
85
|
- Add composable API for colored box shadows ([#5979](https://github.com/tailwindlabs/tailwindcss/pull/5979))
|
|
33
86
|
|
|
@@ -1657,7 +1710,11 @@ No release notes
|
|
|
1657
1710
|
|
|
1658
1711
|
- Everything!
|
|
1659
1712
|
|
|
1660
|
-
[unreleased]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.
|
|
1713
|
+
[unreleased]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.3...HEAD
|
|
1714
|
+
[3.0.3]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.2...v3.0.3
|
|
1715
|
+
[3.0.2]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.1...v3.0.2
|
|
1716
|
+
[3.0.1]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.0...v3.0.1
|
|
1717
|
+
[3.0.0]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.0-alpha.2...v3.0.0
|
|
1661
1718
|
[3.0.0-alpha.2]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.0-alpha.1...v3.0.0-alpha.2
|
|
1662
1719
|
[3.0.0-alpha.1]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.19...v3.0.0-alpha.1
|
|
1663
1720
|
[2.2.19]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.18...v2.2.19
|
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
|
@@ -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
|
}
|
|
@@ -110,7 +110,7 @@ function oneOf(...options) {
|
|
|
110
110
|
manualParsing: true
|
|
111
111
|
});
|
|
112
112
|
}
|
|
113
|
-
let
|
|
113
|
+
let commands = {
|
|
114
114
|
init: {
|
|
115
115
|
run: init,
|
|
116
116
|
args: {
|
|
@@ -187,31 +187,31 @@ 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(
|
|
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,
|
|
195
195
|
...sharedFlags
|
|
196
196
|
}
|
|
197
197
|
});
|
|
198
198
|
process.exit(0);
|
|
199
199
|
}
|
|
200
|
-
let
|
|
200
|
+
let command = ((arg = '')=>arg.startsWith('-') ? undefined : arg
|
|
201
201
|
)(process.argv[2]) || 'build';
|
|
202
|
-
if (
|
|
203
|
-
if (_fs.default.existsSync(_path.default.resolve(
|
|
202
|
+
if (commands[command] === undefined) {
|
|
203
|
+
if (_fs.default.existsSync(_path.default.resolve(command))) {
|
|
204
204
|
// TODO: Deprecate this in future versions
|
|
205
205
|
// Check if non-existing command, might be a file.
|
|
206
|
-
|
|
206
|
+
command = 'build';
|
|
207
207
|
} else {
|
|
208
208
|
help({
|
|
209
|
-
message: `Invalid command: ${
|
|
209
|
+
message: `Invalid command: ${command}`,
|
|
210
210
|
usage: [
|
|
211
211
|
'tailwindcss <command> [options]'
|
|
212
212
|
],
|
|
213
|
-
commands: Object.keys(
|
|
214
|
-
).map((
|
|
213
|
+
commands: Object.keys(commands).filter((command4)=>command4 !== 'build'
|
|
214
|
+
).map((command5)=>`${command5} [options]`
|
|
215
215
|
),
|
|
216
216
|
options: sharedFlags
|
|
217
217
|
});
|
|
@@ -219,11 +219,11 @@ if (commands1[command1] === undefined) {
|
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
221
|
// Execute command
|
|
222
|
-
let { args:
|
|
223
|
-
let
|
|
222
|
+
let { args: flags , run } = commands[command];
|
|
223
|
+
let args = (()=>{
|
|
224
224
|
try {
|
|
225
225
|
let result = (0, _arg).default(Object.fromEntries(Object.entries({
|
|
226
|
-
...
|
|
226
|
+
...flags,
|
|
227
227
|
...sharedFlags
|
|
228
228
|
}).filter(([_key, value])=>{
|
|
229
229
|
var ref;
|
|
@@ -240,23 +240,23 @@ let args1 = (()=>{
|
|
|
240
240
|
let flag = result['_'][i];
|
|
241
241
|
if (!flag.startsWith('-')) continue;
|
|
242
242
|
let flagName = flag;
|
|
243
|
-
let handler =
|
|
243
|
+
let handler = flags[flag];
|
|
244
244
|
// Resolve flagName & handler
|
|
245
245
|
while(typeof handler === 'string'){
|
|
246
246
|
flagName = handler;
|
|
247
|
-
handler =
|
|
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
|
|
@@ -264,8 +264,8 @@ let args1 = (()=>{
|
|
|
264
264
|
//
|
|
265
265
|
// E.g.: tailwindcss input.css -> _: ['build', 'input.css']
|
|
266
266
|
// E.g.: tailwindcss build input.css -> _: ['build', 'input.css']
|
|
267
|
-
if (result['_'][0] !==
|
|
268
|
-
result['_'].unshift(
|
|
267
|
+
if (result['_'][0] !== command) {
|
|
268
|
+
result['_'].unshift(command);
|
|
269
269
|
}
|
|
270
270
|
return result;
|
|
271
271
|
} catch (err) {
|
|
@@ -282,14 +282,14 @@ let args1 = (()=>{
|
|
|
282
282
|
throw err;
|
|
283
283
|
}
|
|
284
284
|
})();
|
|
285
|
-
if (
|
|
285
|
+
if (args['--help']) {
|
|
286
286
|
help({
|
|
287
287
|
options: {
|
|
288
|
-
...
|
|
288
|
+
...flags,
|
|
289
289
|
...sharedFlags
|
|
290
290
|
},
|
|
291
291
|
usage: [
|
|
292
|
-
`tailwindcss ${
|
|
292
|
+
`tailwindcss ${command} [options]`
|
|
293
293
|
]
|
|
294
294
|
});
|
|
295
295
|
process.exit(0);
|
|
@@ -299,17 +299,17 @@ run();
|
|
|
299
299
|
function init() {
|
|
300
300
|
let messages = [];
|
|
301
301
|
var ref;
|
|
302
|
-
let tailwindConfigLocation = _path.default.resolve((ref =
|
|
302
|
+
let tailwindConfigLocation = _path.default.resolve((ref = args['_'][1]) !== null && ref !== void 0 ? ref : './tailwind.config.js');
|
|
303
303
|
if (_fs.default.existsSync(tailwindConfigLocation)) {
|
|
304
304
|
messages.push(`${_path.default.basename(tailwindConfigLocation)} already exists.`);
|
|
305
305
|
} else {
|
|
306
|
-
let stubFile = _fs.default.readFileSync(
|
|
306
|
+
let stubFile = _fs.default.readFileSync(args['--full'] ? _path.default.resolve(__dirname, '../stubs/defaultConfig.stub.js') : _path.default.resolve(__dirname, '../stubs/simpleConfig.stub.js'), 'utf8');
|
|
307
307
|
// Change colors import
|
|
308
308
|
stubFile = stubFile.replace('../colors', 'tailwindcss/colors');
|
|
309
309
|
_fs.default.writeFileSync(tailwindConfigLocation, stubFile, 'utf8');
|
|
310
310
|
messages.push(`Created Tailwind CSS config file: ${_path.default.basename(tailwindConfigLocation)}`);
|
|
311
311
|
}
|
|
312
|
-
if (
|
|
312
|
+
if (args['--postcss']) {
|
|
313
313
|
let postcssConfigLocation = _path.default.resolve('./postcss.config.js');
|
|
314
314
|
if (_fs.default.existsSync(postcssConfigLocation)) {
|
|
315
315
|
messages.push(`${_path.default.basename(postcssConfigLocation)} already exists.`);
|
|
@@ -327,27 +327,27 @@ function init() {
|
|
|
327
327
|
}
|
|
328
328
|
}
|
|
329
329
|
async function build() {
|
|
330
|
-
let input =
|
|
331
|
-
let output =
|
|
332
|
-
let shouldWatch =
|
|
333
|
-
let includePostCss =
|
|
330
|
+
let input = args['--input'];
|
|
331
|
+
let output = args['--output'];
|
|
332
|
+
let shouldWatch = args['--watch'];
|
|
333
|
+
let includePostCss = args['--postcss'];
|
|
334
334
|
// TODO: Deprecate this in future versions
|
|
335
|
-
if (!input &&
|
|
335
|
+
if (!input && args['_'][1]) {
|
|
336
336
|
console.error('[deprecation] Running tailwindcss without -i, please provide an input file.');
|
|
337
|
-
input =
|
|
337
|
+
input = args['--input'] = args['_'][1];
|
|
338
338
|
}
|
|
339
339
|
if (input && !_fs.default.existsSync(input = _path.default.resolve(input))) {
|
|
340
|
-
console.error(`Specified input file ${
|
|
340
|
+
console.error(`Specified input file ${args['--input']} does not exist.`);
|
|
341
341
|
process.exit(9);
|
|
342
342
|
}
|
|
343
|
-
if (
|
|
344
|
-
console.error(`Specified config file ${
|
|
343
|
+
if (args['--config'] && !_fs.default.existsSync(args['--config'] = _path.default.resolve(args['--config']))) {
|
|
344
|
+
console.error(`Specified config file ${args['--config']} does not exist.`);
|
|
345
345
|
process.exit(9);
|
|
346
346
|
}
|
|
347
|
-
let configPath =
|
|
347
|
+
let configPath = args['--config'] ? args['--config'] : ((defaultPath)=>_fs.default.existsSync(defaultPath) ? defaultPath : null
|
|
348
348
|
)(_path.default.resolve('./tailwind.config.js'));
|
|
349
349
|
async function loadPostCssPlugins() {
|
|
350
|
-
let customPostCssPath = typeof
|
|
350
|
+
let customPostCssPath = typeof args['--postcss'] === 'string' ? args['--postcss'] : undefined;
|
|
351
351
|
let { plugins: configPlugins } = customPostCssPath ? await (async ()=>{
|
|
352
352
|
let file = _path.default.resolve(customPostCssPath);
|
|
353
353
|
// Implementation, see: https://unpkg.com/browse/postcss-load-config@3.0.1/src/index.js
|
|
@@ -386,17 +386,17 @@ async function build() {
|
|
|
386
386
|
let config = configPath ? require(configPath) : {
|
|
387
387
|
};
|
|
388
388
|
let resolvedConfig = (0, _resolveConfig).default(config);
|
|
389
|
-
if (
|
|
389
|
+
if (args['--purge']) {
|
|
390
390
|
_log.default.warn('purge-flag-deprecated', [
|
|
391
391
|
'The `--purge` flag has been deprecated.',
|
|
392
392
|
'Please use `--content` instead.',
|
|
393
393
|
]);
|
|
394
|
-
if (!
|
|
395
|
-
|
|
394
|
+
if (!args['--content']) {
|
|
395
|
+
args['--content'] = args['--purge'];
|
|
396
396
|
}
|
|
397
397
|
}
|
|
398
|
-
if (
|
|
399
|
-
resolvedConfig.content.files =
|
|
398
|
+
if (args['--content']) {
|
|
399
|
+
resolvedConfig.content.files = args['--content'].split(/(?<!{[^}]+),/);
|
|
400
400
|
}
|
|
401
401
|
return resolvedConfig;
|
|
402
402
|
}
|
|
@@ -457,9 +457,9 @@ async function build() {
|
|
|
457
457
|
let plugins = [
|
|
458
458
|
...beforePlugins,
|
|
459
459
|
tailwindPlugin,
|
|
460
|
-
!
|
|
460
|
+
!args['--minify'] && formatNodes,
|
|
461
461
|
...afterPlugins,
|
|
462
|
-
!
|
|
462
|
+
!args['--no-autoprefixer'] && (()=>{
|
|
463
463
|
// Try to load a local `autoprefixer` version first
|
|
464
464
|
try {
|
|
465
465
|
return require('autoprefixer');
|
|
@@ -467,7 +467,7 @@ async function build() {
|
|
|
467
467
|
}
|
|
468
468
|
return (0, _indexJs).lazyAutoprefixer();
|
|
469
469
|
})(),
|
|
470
|
-
|
|
470
|
+
args['--minify'] && (()=>{
|
|
471
471
|
let options = {
|
|
472
472
|
preset: [
|
|
473
473
|
'default',
|
|
@@ -541,9 +541,9 @@ async function build() {
|
|
|
541
541
|
let plugins = [
|
|
542
542
|
...beforePlugins,
|
|
543
543
|
'__TAILWIND_PLUGIN_POSITION__',
|
|
544
|
-
!
|
|
544
|
+
!args['--minify'] && formatNodes,
|
|
545
545
|
...afterPlugins,
|
|
546
|
-
!
|
|
546
|
+
!args['--no-autoprefixer'] && (()=>{
|
|
547
547
|
// Try to load a local `autoprefixer` version first
|
|
548
548
|
try {
|
|
549
549
|
return require('autoprefixer');
|
|
@@ -551,7 +551,7 @@ async function build() {
|
|
|
551
551
|
}
|
|
552
552
|
return (0, _indexJs).lazyAutoprefixer();
|
|
553
553
|
})(),
|
|
554
|
-
|
|
554
|
+
args['--minify'] && (()=>{
|
|
555
555
|
let options = {
|
|
556
556
|
preset: [
|
|
557
557
|
'default',
|
package/lib/corePluginList.js
CHANGED