@weapp-tailwindcss/cli 3.0.0 → 4.0.0-alpha.1
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/dist/index.cjs +353 -313
- package/dist/index.d.cts +6 -6
- package/dist/index.d.mts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.mjs +353 -313
- package/package.json +7 -7
package/dist/index.mjs
CHANGED
|
@@ -74,9 +74,18 @@ function getDefaultExportFromCjs (x) {
|
|
|
74
74
|
* Released under the MIT License.
|
|
75
75
|
*/
|
|
76
76
|
|
|
77
|
-
var isobject
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
var isobject;
|
|
78
|
+
var hasRequiredIsobject;
|
|
79
|
+
|
|
80
|
+
function requireIsobject () {
|
|
81
|
+
if (hasRequiredIsobject) return isobject;
|
|
82
|
+
hasRequiredIsobject = 1;
|
|
83
|
+
|
|
84
|
+
isobject = function isObject(val) {
|
|
85
|
+
return val != null && typeof val === 'object' && Array.isArray(val) === false;
|
|
86
|
+
};
|
|
87
|
+
return isobject;
|
|
88
|
+
}
|
|
80
89
|
|
|
81
90
|
/*!
|
|
82
91
|
* get-value <https://github.com/jonschlinkert/get-value>
|
|
@@ -85,111 +94,120 @@ var isobject = function isObject(val) {
|
|
|
85
94
|
* Released under the MIT License.
|
|
86
95
|
*/
|
|
87
96
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
97
|
+
var getValue;
|
|
98
|
+
var hasRequiredGetValue;
|
|
99
|
+
|
|
100
|
+
function requireGetValue () {
|
|
101
|
+
if (hasRequiredGetValue) return getValue;
|
|
102
|
+
hasRequiredGetValue = 1;
|
|
103
|
+
const isObject = requireIsobject();
|
|
104
|
+
|
|
105
|
+
getValue = function(target, path, options) {
|
|
106
|
+
if (!isObject(options)) {
|
|
107
|
+
options = { default: options };
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
if (!isValidObject(target)) {
|
|
111
|
+
return typeof options.default !== 'undefined' ? options.default : target;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
if (typeof path === 'number') {
|
|
115
|
+
path = String(path);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
const isArray = Array.isArray(path);
|
|
119
|
+
const isString = typeof path === 'string';
|
|
120
|
+
const splitChar = options.separator || '.';
|
|
121
|
+
const joinChar = options.joinChar || (typeof splitChar === 'string' ? splitChar : '.');
|
|
122
|
+
|
|
123
|
+
if (!isString && !isArray) {
|
|
124
|
+
return target;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
if (isString && path in target) {
|
|
128
|
+
return isValid(path, target, options) ? target[path] : options.default;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
let segs = isArray ? path : split(path, splitChar, options);
|
|
132
|
+
let len = segs.length;
|
|
133
|
+
let idx = 0;
|
|
134
|
+
|
|
135
|
+
do {
|
|
136
|
+
let prop = segs[idx];
|
|
137
|
+
if (typeof prop === 'number') {
|
|
138
|
+
prop = String(prop);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
while (prop && prop.slice(-1) === '\\') {
|
|
142
|
+
prop = join([prop.slice(0, -1), segs[++idx] || ''], joinChar, options);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
if (prop in target) {
|
|
146
|
+
if (!isValid(prop, target, options)) {
|
|
147
|
+
return options.default;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
target = target[prop];
|
|
151
|
+
} else {
|
|
152
|
+
let hasProp = false;
|
|
153
|
+
let n = idx + 1;
|
|
154
|
+
|
|
155
|
+
while (n < len) {
|
|
156
|
+
prop = join([prop, segs[n++]], joinChar, options);
|
|
157
|
+
|
|
158
|
+
if ((hasProp = prop in target)) {
|
|
159
|
+
if (!isValid(prop, target, options)) {
|
|
160
|
+
return options.default;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
target = target[prop];
|
|
164
|
+
idx = n - 1;
|
|
165
|
+
break;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
if (!hasProp) {
|
|
170
|
+
return options.default;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
} while (++idx < len && isValidObject(target));
|
|
174
|
+
|
|
175
|
+
if (idx === len) {
|
|
176
|
+
return target;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
return options.default;
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
function join(segs, joinChar, options) {
|
|
183
|
+
if (typeof options.join === 'function') {
|
|
184
|
+
return options.join(segs);
|
|
185
|
+
}
|
|
186
|
+
return segs[0] + joinChar + segs[1];
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
function split(path, splitChar, options) {
|
|
190
|
+
if (typeof options.split === 'function') {
|
|
191
|
+
return options.split(path);
|
|
192
|
+
}
|
|
193
|
+
return path.split(splitChar);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
function isValid(key, target, options) {
|
|
197
|
+
if (typeof options.isValid === 'function') {
|
|
198
|
+
return options.isValid(key, target);
|
|
199
|
+
}
|
|
200
|
+
return true;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
function isValidObject(val) {
|
|
204
|
+
return isObject(val) || Array.isArray(val) || typeof val === 'function';
|
|
205
|
+
}
|
|
206
|
+
return getValue;
|
|
172
207
|
}
|
|
173
208
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
return options.split(path);
|
|
177
|
-
}
|
|
178
|
-
return path.split(splitChar);
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
function isValid(key, target, options) {
|
|
182
|
-
if (typeof options.isValid === 'function') {
|
|
183
|
-
return options.isValid(key, target);
|
|
184
|
-
}
|
|
185
|
-
return true;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
function isValidObject(val) {
|
|
189
|
-
return isObject$3(val) || Array.isArray(val) || typeof val === 'function';
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
const get = /*@__PURE__*/getDefaultExportFromCjs(getValue);
|
|
209
|
+
var getValueExports = requireGetValue();
|
|
210
|
+
const get = /*@__PURE__*/getDefaultExportFromCjs(getValueExports);
|
|
193
211
|
|
|
194
212
|
/*!
|
|
195
213
|
* is-primitive <https://github.com/jonschlinkert/is-primitive>
|
|
@@ -198,12 +216,21 @@ const get = /*@__PURE__*/getDefaultExportFromCjs(getValue);
|
|
|
198
216
|
* Released under the MIT License.
|
|
199
217
|
*/
|
|
200
218
|
|
|
201
|
-
var isPrimitive
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
219
|
+
var isPrimitive;
|
|
220
|
+
var hasRequiredIsPrimitive;
|
|
221
|
+
|
|
222
|
+
function requireIsPrimitive () {
|
|
223
|
+
if (hasRequiredIsPrimitive) return isPrimitive;
|
|
224
|
+
hasRequiredIsPrimitive = 1;
|
|
225
|
+
|
|
226
|
+
isPrimitive = function isPrimitive(val) {
|
|
227
|
+
if (typeof val === 'object') {
|
|
228
|
+
return val === null;
|
|
229
|
+
}
|
|
230
|
+
return typeof val !== 'function';
|
|
231
|
+
};
|
|
232
|
+
return isPrimitive;
|
|
233
|
+
}
|
|
207
234
|
|
|
208
235
|
/*!
|
|
209
236
|
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
@@ -212,34 +239,43 @@ var isPrimitive$1 = function isPrimitive(val) {
|
|
|
212
239
|
* Released under the MIT License.
|
|
213
240
|
*/
|
|
214
241
|
|
|
215
|
-
var
|
|
242
|
+
var isPlainObject$1;
|
|
243
|
+
var hasRequiredIsPlainObject;
|
|
216
244
|
|
|
217
|
-
function
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
}
|
|
245
|
+
function requireIsPlainObject () {
|
|
246
|
+
if (hasRequiredIsPlainObject) return isPlainObject$1;
|
|
247
|
+
hasRequiredIsPlainObject = 1;
|
|
221
248
|
|
|
222
|
-
var
|
|
223
|
-
var ctor,prot;
|
|
249
|
+
var isObject = requireIsobject();
|
|
224
250
|
|
|
225
|
-
|
|
251
|
+
function isObjectObject(o) {
|
|
252
|
+
return isObject(o) === true
|
|
253
|
+
&& Object.prototype.toString.call(o) === '[object Object]';
|
|
254
|
+
}
|
|
226
255
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
if (typeof ctor !== 'function') return false;
|
|
256
|
+
isPlainObject$1 = function isPlainObject(o) {
|
|
257
|
+
var ctor,prot;
|
|
230
258
|
|
|
231
|
-
|
|
232
|
-
prot = ctor.prototype;
|
|
233
|
-
if (isObjectObject(prot) === false) return false;
|
|
259
|
+
if (isObjectObject(o) === false) return false;
|
|
234
260
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
}
|
|
261
|
+
// If has modified constructor
|
|
262
|
+
ctor = o.constructor;
|
|
263
|
+
if (typeof ctor !== 'function') return false;
|
|
239
264
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
265
|
+
// If has modified prototype
|
|
266
|
+
prot = ctor.prototype;
|
|
267
|
+
if (isObjectObject(prot) === false) return false;
|
|
268
|
+
|
|
269
|
+
// If constructor does not have an Object-specific method
|
|
270
|
+
if (prot.hasOwnProperty('isPrototypeOf') === false) {
|
|
271
|
+
return false;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
// Most likely a plain Object
|
|
275
|
+
return true;
|
|
276
|
+
};
|
|
277
|
+
return isPlainObject$1;
|
|
278
|
+
}
|
|
243
279
|
|
|
244
280
|
/*!
|
|
245
281
|
* set-value <https://github.com/jonschlinkert/set-value>
|
|
@@ -248,168 +284,178 @@ var isPlainObject$2 = function isPlainObject(o) {
|
|
|
248
284
|
* Released under the MIT License.
|
|
249
285
|
*/
|
|
250
286
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
const
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
};
|
|
347
|
-
|
|
348
|
-
const
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
};
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
287
|
+
var setValue_1;
|
|
288
|
+
var hasRequiredSetValue;
|
|
289
|
+
|
|
290
|
+
function requireSetValue () {
|
|
291
|
+
if (hasRequiredSetValue) return setValue_1;
|
|
292
|
+
hasRequiredSetValue = 1;
|
|
293
|
+
|
|
294
|
+
const { deleteProperty } = Reflect;
|
|
295
|
+
const isPrimitive = requireIsPrimitive();
|
|
296
|
+
const isPlainObject = requireIsPlainObject();
|
|
297
|
+
|
|
298
|
+
const isObject = value => {
|
|
299
|
+
return (typeof value === 'object' && value !== null) || typeof value === 'function';
|
|
300
|
+
};
|
|
301
|
+
|
|
302
|
+
const isUnsafeKey = key => {
|
|
303
|
+
return key === '__proto__' || key === 'constructor' || key === 'prototype';
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
const validateKey = key => {
|
|
307
|
+
if (!isPrimitive(key)) {
|
|
308
|
+
throw new TypeError('Object keys must be strings or symbols');
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
if (isUnsafeKey(key)) {
|
|
312
|
+
throw new Error(`Cannot set unsafe key: "${key}"`);
|
|
313
|
+
}
|
|
314
|
+
};
|
|
315
|
+
|
|
316
|
+
const toStringKey = input => {
|
|
317
|
+
return Array.isArray(input) ? input.flat().map(String).join(',') : input;
|
|
318
|
+
};
|
|
319
|
+
|
|
320
|
+
const createMemoKey = (input, options) => {
|
|
321
|
+
if (typeof input !== 'string' || !options) return input;
|
|
322
|
+
let key = input + ';';
|
|
323
|
+
if (options.arrays !== undefined) key += `arrays=${options.arrays};`;
|
|
324
|
+
if (options.separator !== undefined) key += `separator=${options.separator};`;
|
|
325
|
+
if (options.split !== undefined) key += `split=${options.split};`;
|
|
326
|
+
if (options.merge !== undefined) key += `merge=${options.merge};`;
|
|
327
|
+
if (options.preservePaths !== undefined) key += `preservePaths=${options.preservePaths};`;
|
|
328
|
+
return key;
|
|
329
|
+
};
|
|
330
|
+
|
|
331
|
+
const memoize = (input, options, fn) => {
|
|
332
|
+
const key = toStringKey(options ? createMemoKey(input, options) : input);
|
|
333
|
+
validateKey(key);
|
|
334
|
+
|
|
335
|
+
const value = setValue.cache.get(key) || fn();
|
|
336
|
+
setValue.cache.set(key, value);
|
|
337
|
+
return value;
|
|
338
|
+
};
|
|
339
|
+
|
|
340
|
+
const splitString = (input, options = {}) => {
|
|
341
|
+
const sep = options.separator || '.';
|
|
342
|
+
const preserve = sep === '/' ? false : options.preservePaths;
|
|
343
|
+
|
|
344
|
+
if (typeof input === 'string' && preserve !== false && /\//.test(input)) {
|
|
345
|
+
return [input];
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
const parts = [];
|
|
349
|
+
let part = '';
|
|
350
|
+
|
|
351
|
+
const push = part => {
|
|
352
|
+
let number;
|
|
353
|
+
if (part.trim() !== '' && Number.isInteger((number = Number(part)))) {
|
|
354
|
+
parts.push(number);
|
|
355
|
+
} else {
|
|
356
|
+
parts.push(part);
|
|
357
|
+
}
|
|
358
|
+
};
|
|
359
|
+
|
|
360
|
+
for (let i = 0; i < input.length; i++) {
|
|
361
|
+
const value = input[i];
|
|
362
|
+
|
|
363
|
+
if (value === '\\') {
|
|
364
|
+
part += input[++i];
|
|
365
|
+
continue;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
if (value === sep) {
|
|
369
|
+
push(part);
|
|
370
|
+
part = '';
|
|
371
|
+
continue;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
part += value;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
if (part) {
|
|
378
|
+
push(part);
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
return parts;
|
|
382
|
+
};
|
|
383
|
+
|
|
384
|
+
const split = (input, options) => {
|
|
385
|
+
if (options && typeof options.split === 'function') return options.split(input);
|
|
386
|
+
if (typeof input === 'symbol') return [input];
|
|
387
|
+
if (Array.isArray(input)) return input;
|
|
388
|
+
return memoize(input, options, () => splitString(input, options));
|
|
389
|
+
};
|
|
390
|
+
|
|
391
|
+
const assignProp = (obj, prop, value, options) => {
|
|
392
|
+
validateKey(prop);
|
|
393
|
+
|
|
394
|
+
// Delete property when "value" is undefined
|
|
395
|
+
if (value === undefined) {
|
|
396
|
+
deleteProperty(obj, prop);
|
|
397
|
+
|
|
398
|
+
} else if (options && options.merge) {
|
|
399
|
+
const merge = options.merge === 'function' ? options.merge : Object.assign;
|
|
400
|
+
|
|
401
|
+
// Only merge plain objects
|
|
402
|
+
if (merge && isPlainObject(obj[prop]) && isPlainObject(value)) {
|
|
403
|
+
obj[prop] = merge(obj[prop], value);
|
|
404
|
+
} else {
|
|
405
|
+
obj[prop] = value;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
} else {
|
|
409
|
+
obj[prop] = value;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
return obj;
|
|
413
|
+
};
|
|
414
|
+
|
|
415
|
+
const setValue = (target, path, value, options) => {
|
|
416
|
+
if (!path || !isObject(target)) return target;
|
|
417
|
+
|
|
418
|
+
const keys = split(path, options);
|
|
419
|
+
let obj = target;
|
|
420
|
+
|
|
421
|
+
for (let i = 0; i < keys.length; i++) {
|
|
422
|
+
const key = keys[i];
|
|
423
|
+
const next = keys[i + 1];
|
|
424
|
+
|
|
425
|
+
validateKey(key);
|
|
426
|
+
|
|
427
|
+
if (next === undefined) {
|
|
428
|
+
assignProp(obj, key, value, options);
|
|
429
|
+
break;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
if (typeof next === 'number' && !Array.isArray(obj[key])) {
|
|
433
|
+
obj = obj[key] = [];
|
|
434
|
+
continue;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
if (!isObject(obj[key])) {
|
|
438
|
+
obj[key] = {};
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
obj = obj[key];
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
return target;
|
|
445
|
+
};
|
|
446
|
+
|
|
447
|
+
setValue.split = split;
|
|
448
|
+
setValue.cache = new Map();
|
|
449
|
+
setValue.clear = () => {
|
|
450
|
+
setValue.cache = new Map();
|
|
451
|
+
};
|
|
452
|
+
|
|
453
|
+
setValue_1 = setValue;
|
|
454
|
+
return setValue_1;
|
|
455
|
+
}
|
|
411
456
|
|
|
412
|
-
|
|
457
|
+
var setValueExports = requireSetValue();
|
|
458
|
+
const set = /*@__PURE__*/getDefaultExportFromCjs(setValueExports);
|
|
413
459
|
|
|
414
460
|
function isObject(x) {
|
|
415
461
|
return typeof x === "object" && x !== null;
|
|
@@ -420,11 +466,11 @@ function promisify(task) {
|
|
|
420
466
|
return Promise.all(task.map((x) => promisify(x))).then(resolve).catch(reject);
|
|
421
467
|
} else {
|
|
422
468
|
if (task.destroyed) {
|
|
423
|
-
resolve(
|
|
469
|
+
resolve(undefined);
|
|
424
470
|
return;
|
|
425
471
|
}
|
|
426
472
|
task.on("finish", () => {
|
|
427
|
-
resolve(
|
|
473
|
+
resolve(undefined);
|
|
428
474
|
}).on("error", (err) => {
|
|
429
475
|
reject(err);
|
|
430
476
|
});
|
|
@@ -441,16 +487,10 @@ function isTsLang(lang) {
|
|
|
441
487
|
return lang === "ts";
|
|
442
488
|
}
|
|
443
489
|
|
|
444
|
-
var __defProp = Object.defineProperty;
|
|
445
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
446
|
-
var __publicField = (obj, key, value) => {
|
|
447
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
448
|
-
return value;
|
|
449
|
-
};
|
|
450
490
|
class GlobsSet {
|
|
491
|
+
includeSet;
|
|
492
|
+
excludeSet;
|
|
451
493
|
constructor() {
|
|
452
|
-
__publicField(this, "includeSet");
|
|
453
|
-
__publicField(this, "excludeSet");
|
|
454
494
|
this.includeSet = /* @__PURE__ */ new Set();
|
|
455
495
|
this.excludeSet = /* @__PURE__ */ new Set();
|
|
456
496
|
}
|
|
@@ -480,7 +520,7 @@ class GlobsSet {
|
|
|
480
520
|
}
|
|
481
521
|
|
|
482
522
|
function isStream(stream, { checkOpen = true } = {}) {
|
|
483
|
-
return stream !== null && typeof stream === "object" && (stream.writable || stream.readable || !checkOpen || stream.writable ===
|
|
523
|
+
return stream !== null && typeof stream === "object" && (stream.writable || stream.readable || !checkOpen || stream.writable === undefined && stream.readable === undefined) && typeof stream.pipe === "function";
|
|
484
524
|
}
|
|
485
525
|
|
|
486
526
|
function normalizePlugin(plugin) {
|
|
@@ -520,7 +560,7 @@ async function getTasks(options) {
|
|
|
520
560
|
const enableLess = Boolean(preprocessorOptions?.less);
|
|
521
561
|
function resolvePipes(plugins, type) {
|
|
522
562
|
const newPlugins = gulpChain(plugins, type);
|
|
523
|
-
if (newPlugins ===
|
|
563
|
+
if (newPlugins === undefined) {
|
|
524
564
|
return plugins;
|
|
525
565
|
}
|
|
526
566
|
return newPlugins.map((x) => normalizePlugin(x)).filter((x) => x);
|
|
@@ -529,7 +569,7 @@ async function getTasks(options) {
|
|
|
529
569
|
typescriptOptions = {
|
|
530
570
|
tsConfigFileName: "tsconfig.json"
|
|
531
571
|
};
|
|
532
|
-
} else if (isObject(typescriptOptions) && typescriptOptions.tsConfigFileName ===
|
|
572
|
+
} else if (isObject(typescriptOptions) && typescriptOptions.tsConfigFileName === undefined) {
|
|
533
573
|
typescriptOptions.tsConfigFileName = "tsconfig.json";
|
|
534
574
|
}
|
|
535
575
|
const enableTs = Boolean(typescriptOptions);
|
|
@@ -588,7 +628,7 @@ async function getTasks(options) {
|
|
|
588
628
|
pipes.push(transformJs({
|
|
589
629
|
babelParserOptions: !enableTs && isTs ? {
|
|
590
630
|
plugins: ["typescript"]
|
|
591
|
-
} :
|
|
631
|
+
} : undefined
|
|
592
632
|
}));
|
|
593
633
|
if (loadTs) {
|
|
594
634
|
pipes.push(rename({
|
|
@@ -641,11 +681,11 @@ async function getTasks(options) {
|
|
|
641
681
|
if (loadSass) {
|
|
642
682
|
pipes.push(sass.sync(
|
|
643
683
|
// @ts-ignore
|
|
644
|
-
typeof preprocessorOptions?.sass === "boolean" ?
|
|
684
|
+
typeof preprocessorOptions?.sass === "boolean" ? undefined : preprocessorOptions?.sass
|
|
645
685
|
).on("error", sass.logError));
|
|
646
686
|
}
|
|
647
687
|
if (loadLess) {
|
|
648
|
-
pipes.push(less(typeof preprocessorOptions?.less === "boolean" ?
|
|
688
|
+
pipes.push(less(typeof preprocessorOptions?.less === "boolean" ? undefined : preprocessorOptions?.less));
|
|
649
689
|
}
|
|
650
690
|
if (postcssOptions) {
|
|
651
691
|
pipes.push(postcssrc(postcssOptions?.plugins, postcssOptions?.options));
|
|
@@ -753,7 +793,7 @@ function _defu(baseObject, defaults, namespace = ".", merger) {
|
|
|
753
793
|
continue;
|
|
754
794
|
}
|
|
755
795
|
const value = baseObject[key];
|
|
756
|
-
if (value === null || value ===
|
|
796
|
+
if (value === null || value === undefined) {
|
|
757
797
|
continue;
|
|
758
798
|
}
|
|
759
799
|
if (merger && merger(object, key, value, namespace)) {
|
|
@@ -782,7 +822,7 @@ function createDefu(merger) {
|
|
|
782
822
|
}
|
|
783
823
|
const defu = createDefu();
|
|
784
824
|
|
|
785
|
-
const version = "
|
|
825
|
+
const version = "4.0.0-alpha.1";
|
|
786
826
|
|
|
787
827
|
async function createBuilder(options) {
|
|
788
828
|
let postcssOptionsFromConfig;
|
|
@@ -821,7 +861,7 @@ async function createBuilder(options) {
|
|
|
821
861
|
debug("del end");
|
|
822
862
|
}
|
|
823
863
|
return {
|
|
824
|
-
watcher:
|
|
864
|
+
watcher: undefined,
|
|
825
865
|
async build() {
|
|
826
866
|
if (clean2) {
|
|
827
867
|
await doClean();
|