tailwindcss 0.0.0-insiders.e4af07f → 0.0.0-insiders.e4b398b
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/lib/cli/build/plugin.js +8 -7
- package/lib/cli/build/watching.js +1 -1
- package/lib/cli/help/index.js +2 -2
- package/lib/cli/index.js +3 -3
- package/lib/corePlugins.js +158 -154
- package/lib/featureFlags.js +6 -5
- package/lib/lib/content.js +2 -2
- package/lib/lib/evaluateTailwindFunctions.js +4 -4
- package/lib/lib/expandTailwindAtRules.js +10 -9
- package/lib/lib/generateRules.js +17 -9
- package/lib/lib/resolveDefaultsAtRules.js +1 -1
- package/lib/lib/setupContextUtils.js +66 -41
- package/lib/lib/setupTrackingContext.js +3 -2
- package/lib/lib/substituteScreenAtRules.js +2 -2
- package/lib/plugin.js +4 -4
- package/lib/postcss-plugins/nesting/index.js +1 -1
- package/lib/postcss-plugins/nesting/plugin.js +2 -2
- package/lib/processTailwindFeatures.js +3 -3
- package/lib/public/colors.js +1 -1
- package/lib/util/color.js +3 -3
- package/lib/util/createUtilityPlugin.js +2 -2
- package/lib/util/dataTypes.js +61 -7
- package/lib/util/defaults.js +4 -4
- package/lib/util/escapeClassName.js +2 -2
- package/lib/util/formatVariantSelector.js +11 -9
- package/lib/util/getAllConfigs.js +3 -2
- package/lib/util/normalizeConfig.js +26 -21
- package/lib/util/normalizeScreens.js +3 -3
- package/lib/util/pluginUtils.js +6 -6
- package/lib/util/prefixSelector.js +1 -1
- package/lib/util/resolveConfig.js +10 -6
- package/lib/util/withAlphaVariable.js +1 -1
- package/package.json +12 -12
- package/src/cli/build/plugin.js +2 -2
- package/src/corePlugins.js +12 -6
- package/src/lib/expandTailwindAtRules.js +15 -11
- package/src/lib/generateRules.js +11 -4
- package/src/lib/setupContextUtils.js +18 -5
- package/src/plugin.js +3 -3
- package/src/processTailwindFeatures.js +3 -2
- package/src/util/dataTypes.js +59 -11
- package/src/util/formatVariantSelector.js +4 -3
- package/src/util/normalizeConfig.js +1 -1
- package/src/util/prefixSelector.js +1 -0
package/lib/cli/build/plugin.js
CHANGED
|
@@ -82,7 +82,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
82
82
|
function license() {
|
|
83
83
|
return `/* ! tailwindcss v${_packagejson.default.version} | MIT License | https://tailwindcss.com */\n`;
|
|
84
84
|
}
|
|
85
|
-
async function lightningcss(result, { map =true
|
|
85
|
+
async function lightningcss(result, { map = true, minify = true } = {}) {
|
|
86
86
|
try {
|
|
87
87
|
var _browserslist_findConfig;
|
|
88
88
|
var _result_opts_from;
|
|
@@ -126,7 +126,7 @@ async function lightningcss(result, { map =true , minify =true } = {}) {
|
|
|
126
126
|
let file = _path.default.resolve(customPostCssPath);
|
|
127
127
|
// Implementation, see: https://unpkg.com/browse/postcss-load-config@3.1.0/src/index.js
|
|
128
128
|
// @ts-ignore
|
|
129
|
-
let { config ={}
|
|
129
|
+
let { config = {} } = await (0, _lilconfig.lilconfig)("postcss").load(file);
|
|
130
130
|
if (typeof config === "function") {
|
|
131
131
|
config = config();
|
|
132
132
|
} else {
|
|
@@ -180,6 +180,7 @@ let state = {
|
|
|
180
180
|
};
|
|
181
181
|
},
|
|
182
182
|
loadConfig (configPath, content) {
|
|
183
|
+
var _content;
|
|
183
184
|
if (this.watcher && configPath) {
|
|
184
185
|
this.refreshConfigDependencies();
|
|
185
186
|
}
|
|
@@ -196,7 +197,7 @@ let state = {
|
|
|
196
197
|
};
|
|
197
198
|
this.configBag.config = (0, _validateConfig.validateConfig)((0, _resolveConfig.default)(this.configBag.config));
|
|
198
199
|
// Override content files if `--content` has been passed explicitly
|
|
199
|
-
if ((content === null ||
|
|
200
|
+
if (((_content = content) === null || _content === void 0 ? void 0 : _content.length) > 0) {
|
|
200
201
|
this.configBag.config.content.files = content;
|
|
201
202
|
}
|
|
202
203
|
return this.configBag.config;
|
|
@@ -229,7 +230,7 @@ let state = {
|
|
|
229
230
|
let rawContent = this.config.content.files.filter((file)=>{
|
|
230
231
|
return file !== null && typeof file === "object";
|
|
231
232
|
});
|
|
232
|
-
for (let { raw: htmlContent
|
|
233
|
+
for (let { raw: htmlContent, extension = "html" } of rawContent){
|
|
233
234
|
content.push({
|
|
234
235
|
content: htmlContent,
|
|
235
236
|
extension
|
|
@@ -237,7 +238,7 @@ let state = {
|
|
|
237
238
|
}
|
|
238
239
|
return content;
|
|
239
240
|
},
|
|
240
|
-
getContext ({ createContext
|
|
241
|
+
getContext ({ createContext, cliConfigPath, root, result, content }) {
|
|
241
242
|
if (this.context) {
|
|
242
243
|
this.context.changedContent = this.changedContent.splice(0);
|
|
243
244
|
return this.context;
|
|
@@ -295,9 +296,9 @@ async function createProcessor(args, cliConfigPath) {
|
|
|
295
296
|
let tailwindPlugin = ()=>{
|
|
296
297
|
return {
|
|
297
298
|
postcssPlugin: "tailwindcss",
|
|
298
|
-
Once (root, { result
|
|
299
|
+
async Once (root, { result }) {
|
|
299
300
|
_sharedState.env.DEBUG && console.time("Compiling CSS");
|
|
300
|
-
(0, _processTailwindFeatures.default)(({ createContext
|
|
301
|
+
await (0, _processTailwindFeatures.default)(({ createContext })=>{
|
|
301
302
|
console.error();
|
|
302
303
|
console.error("Rebuilding...");
|
|
303
304
|
return ()=>{
|
|
@@ -20,7 +20,7 @@ function _interop_require_default(obj) {
|
|
|
20
20
|
default: obj
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
function createWatcher(args, { state
|
|
23
|
+
function createWatcher(args, { state, rebuild }) {
|
|
24
24
|
let shouldPoll = args["--poll"];
|
|
25
25
|
let shouldCoalesceWriteEvents = shouldPoll || process.platform === "win32";
|
|
26
26
|
// Polling interval in milliseconds
|
package/lib/cli/help/index.js
CHANGED
|
@@ -15,7 +15,7 @@ function _interop_require_default(obj) {
|
|
|
15
15
|
default: obj
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
|
-
function help({ message
|
|
18
|
+
function help({ message, usage, commands, options }) {
|
|
19
19
|
let indent = 2;
|
|
20
20
|
// Render header
|
|
21
21
|
console.log();
|
|
@@ -60,7 +60,7 @@ function help({ message , usage , commands , options }) {
|
|
|
60
60
|
}
|
|
61
61
|
console.log();
|
|
62
62
|
console.log("Options:");
|
|
63
|
-
for (let { flags
|
|
63
|
+
for (let { flags, description, deprecated } of Object.values(groupedOptions)){
|
|
64
64
|
if (deprecated) continue;
|
|
65
65
|
if (flags.length === 1) {
|
|
66
66
|
console.log(" ".repeat(indent + 4 /* 4 = "-i, ".length */ ), flags.slice().reverse().join(", ").padEnd(20, " "), description);
|
package/lib/cli/index.js
CHANGED
|
@@ -144,15 +144,15 @@ if (commands[command] === undefined) {
|
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
// Execute command
|
|
147
|
-
let { args: flags
|
|
147
|
+
let { args: flags, run } = commands[command];
|
|
148
148
|
let args = (()=>{
|
|
149
149
|
try {
|
|
150
150
|
let result = (0, _arg.default)(Object.fromEntries(Object.entries({
|
|
151
151
|
...flags,
|
|
152
152
|
...sharedFlags
|
|
153
153
|
}).filter(([_key, value])=>{
|
|
154
|
-
var _value_type;
|
|
155
|
-
return !(value === null ||
|
|
154
|
+
var _value_type, _value;
|
|
155
|
+
return !((_value = value) === null || _value === void 0 ? void 0 : (_value_type = _value.type) === null || _value_type === void 0 ? void 0 : _value_type.manualParsing);
|
|
156
156
|
}).map(([key, value])=>[
|
|
157
157
|
key,
|
|
158
158
|
typeof value === "object" ? value.type : value
|