@weapp-tailwindcss/cli 3.0.0-alpha.2 → 4.0.0-alpha.0
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.cjs
CHANGED
|
@@ -91,9 +91,18 @@ function getDefaultExportFromCjs (x) {
|
|
|
91
91
|
* Released under the MIT License.
|
|
92
92
|
*/
|
|
93
93
|
|
|
94
|
-
var isobject
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
var isobject;
|
|
95
|
+
var hasRequiredIsobject;
|
|
96
|
+
|
|
97
|
+
function requireIsobject () {
|
|
98
|
+
if (hasRequiredIsobject) return isobject;
|
|
99
|
+
hasRequiredIsobject = 1;
|
|
100
|
+
|
|
101
|
+
isobject = function isObject(val) {
|
|
102
|
+
return val != null && typeof val === 'object' && Array.isArray(val) === false;
|
|
103
|
+
};
|
|
104
|
+
return isobject;
|
|
105
|
+
}
|
|
97
106
|
|
|
98
107
|
/*!
|
|
99
108
|
* get-value <https://github.com/jonschlinkert/get-value>
|
|
@@ -102,111 +111,120 @@ var isobject = function isObject(val) {
|
|
|
102
111
|
* Released under the MIT License.
|
|
103
112
|
*/
|
|
104
113
|
|
|
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
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
114
|
+
var getValue;
|
|
115
|
+
var hasRequiredGetValue;
|
|
116
|
+
|
|
117
|
+
function requireGetValue () {
|
|
118
|
+
if (hasRequiredGetValue) return getValue;
|
|
119
|
+
hasRequiredGetValue = 1;
|
|
120
|
+
const isObject = requireIsobject();
|
|
121
|
+
|
|
122
|
+
getValue = function(target, path, options) {
|
|
123
|
+
if (!isObject(options)) {
|
|
124
|
+
options = { default: options };
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
if (!isValidObject(target)) {
|
|
128
|
+
return typeof options.default !== 'undefined' ? options.default : target;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
if (typeof path === 'number') {
|
|
132
|
+
path = String(path);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
const isArray = Array.isArray(path);
|
|
136
|
+
const isString = typeof path === 'string';
|
|
137
|
+
const splitChar = options.separator || '.';
|
|
138
|
+
const joinChar = options.joinChar || (typeof splitChar === 'string' ? splitChar : '.');
|
|
139
|
+
|
|
140
|
+
if (!isString && !isArray) {
|
|
141
|
+
return target;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
if (isString && path in target) {
|
|
145
|
+
return isValid(path, target, options) ? target[path] : options.default;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
let segs = isArray ? path : split(path, splitChar, options);
|
|
149
|
+
let len = segs.length;
|
|
150
|
+
let idx = 0;
|
|
151
|
+
|
|
152
|
+
do {
|
|
153
|
+
let prop = segs[idx];
|
|
154
|
+
if (typeof prop === 'number') {
|
|
155
|
+
prop = String(prop);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
while (prop && prop.slice(-1) === '\\') {
|
|
159
|
+
prop = join([prop.slice(0, -1), segs[++idx] || ''], joinChar, options);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
if (prop in target) {
|
|
163
|
+
if (!isValid(prop, target, options)) {
|
|
164
|
+
return options.default;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
target = target[prop];
|
|
168
|
+
} else {
|
|
169
|
+
let hasProp = false;
|
|
170
|
+
let n = idx + 1;
|
|
171
|
+
|
|
172
|
+
while (n < len) {
|
|
173
|
+
prop = join([prop, segs[n++]], joinChar, options);
|
|
174
|
+
|
|
175
|
+
if ((hasProp = prop in target)) {
|
|
176
|
+
if (!isValid(prop, target, options)) {
|
|
177
|
+
return options.default;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
target = target[prop];
|
|
181
|
+
idx = n - 1;
|
|
182
|
+
break;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
if (!hasProp) {
|
|
187
|
+
return options.default;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
} while (++idx < len && isValidObject(target));
|
|
191
|
+
|
|
192
|
+
if (idx === len) {
|
|
193
|
+
return target;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
return options.default;
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
function join(segs, joinChar, options) {
|
|
200
|
+
if (typeof options.join === 'function') {
|
|
201
|
+
return options.join(segs);
|
|
202
|
+
}
|
|
203
|
+
return segs[0] + joinChar + segs[1];
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
function split(path, splitChar, options) {
|
|
207
|
+
if (typeof options.split === 'function') {
|
|
208
|
+
return options.split(path);
|
|
209
|
+
}
|
|
210
|
+
return path.split(splitChar);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
function isValid(key, target, options) {
|
|
214
|
+
if (typeof options.isValid === 'function') {
|
|
215
|
+
return options.isValid(key, target);
|
|
216
|
+
}
|
|
217
|
+
return true;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
function isValidObject(val) {
|
|
221
|
+
return isObject(val) || Array.isArray(val) || typeof val === 'function';
|
|
222
|
+
}
|
|
223
|
+
return getValue;
|
|
189
224
|
}
|
|
190
225
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
return options.split(path);
|
|
194
|
-
}
|
|
195
|
-
return path.split(splitChar);
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
function isValid(key, target, options) {
|
|
199
|
-
if (typeof options.isValid === 'function') {
|
|
200
|
-
return options.isValid(key, target);
|
|
201
|
-
}
|
|
202
|
-
return true;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
function isValidObject(val) {
|
|
206
|
-
return isObject$3(val) || Array.isArray(val) || typeof val === 'function';
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
const get = /*@__PURE__*/getDefaultExportFromCjs(getValue);
|
|
226
|
+
var getValueExports = requireGetValue();
|
|
227
|
+
const get = /*@__PURE__*/getDefaultExportFromCjs(getValueExports);
|
|
210
228
|
|
|
211
229
|
/*!
|
|
212
230
|
* is-primitive <https://github.com/jonschlinkert/is-primitive>
|
|
@@ -215,12 +233,21 @@ const get = /*@__PURE__*/getDefaultExportFromCjs(getValue);
|
|
|
215
233
|
* Released under the MIT License.
|
|
216
234
|
*/
|
|
217
235
|
|
|
218
|
-
var isPrimitive
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
236
|
+
var isPrimitive;
|
|
237
|
+
var hasRequiredIsPrimitive;
|
|
238
|
+
|
|
239
|
+
function requireIsPrimitive () {
|
|
240
|
+
if (hasRequiredIsPrimitive) return isPrimitive;
|
|
241
|
+
hasRequiredIsPrimitive = 1;
|
|
242
|
+
|
|
243
|
+
isPrimitive = function isPrimitive(val) {
|
|
244
|
+
if (typeof val === 'object') {
|
|
245
|
+
return val === null;
|
|
246
|
+
}
|
|
247
|
+
return typeof val !== 'function';
|
|
248
|
+
};
|
|
249
|
+
return isPrimitive;
|
|
250
|
+
}
|
|
224
251
|
|
|
225
252
|
/*!
|
|
226
253
|
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
|
|
@@ -229,34 +256,43 @@ var isPrimitive$1 = function isPrimitive(val) {
|
|
|
229
256
|
* Released under the MIT License.
|
|
230
257
|
*/
|
|
231
258
|
|
|
232
|
-
var
|
|
259
|
+
var isPlainObject$1;
|
|
260
|
+
var hasRequiredIsPlainObject;
|
|
233
261
|
|
|
234
|
-
function
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
}
|
|
262
|
+
function requireIsPlainObject () {
|
|
263
|
+
if (hasRequiredIsPlainObject) return isPlainObject$1;
|
|
264
|
+
hasRequiredIsPlainObject = 1;
|
|
238
265
|
|
|
239
|
-
var
|
|
240
|
-
var ctor,prot;
|
|
266
|
+
var isObject = requireIsobject();
|
|
241
267
|
|
|
242
|
-
|
|
268
|
+
function isObjectObject(o) {
|
|
269
|
+
return isObject(o) === true
|
|
270
|
+
&& Object.prototype.toString.call(o) === '[object Object]';
|
|
271
|
+
}
|
|
243
272
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
if (typeof ctor !== 'function') return false;
|
|
273
|
+
isPlainObject$1 = function isPlainObject(o) {
|
|
274
|
+
var ctor,prot;
|
|
247
275
|
|
|
248
|
-
|
|
249
|
-
prot = ctor.prototype;
|
|
250
|
-
if (isObjectObject(prot) === false) return false;
|
|
276
|
+
if (isObjectObject(o) === false) return false;
|
|
251
277
|
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
}
|
|
278
|
+
// If has modified constructor
|
|
279
|
+
ctor = o.constructor;
|
|
280
|
+
if (typeof ctor !== 'function') return false;
|
|
256
281
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
282
|
+
// If has modified prototype
|
|
283
|
+
prot = ctor.prototype;
|
|
284
|
+
if (isObjectObject(prot) === false) return false;
|
|
285
|
+
|
|
286
|
+
// If constructor does not have an Object-specific method
|
|
287
|
+
if (prot.hasOwnProperty('isPrototypeOf') === false) {
|
|
288
|
+
return false;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
// Most likely a plain Object
|
|
292
|
+
return true;
|
|
293
|
+
};
|
|
294
|
+
return isPlainObject$1;
|
|
295
|
+
}
|
|
260
296
|
|
|
261
297
|
/*!
|
|
262
298
|
* set-value <https://github.com/jonschlinkert/set-value>
|
|
@@ -265,168 +301,178 @@ var isPlainObject$2 = function isPlainObject(o) {
|
|
|
265
301
|
* Released under the MIT License.
|
|
266
302
|
*/
|
|
267
303
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
const
|
|
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
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
};
|
|
364
|
-
|
|
365
|
-
const
|
|
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
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
};
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
304
|
+
var setValue_1;
|
|
305
|
+
var hasRequiredSetValue;
|
|
306
|
+
|
|
307
|
+
function requireSetValue () {
|
|
308
|
+
if (hasRequiredSetValue) return setValue_1;
|
|
309
|
+
hasRequiredSetValue = 1;
|
|
310
|
+
|
|
311
|
+
const { deleteProperty } = Reflect;
|
|
312
|
+
const isPrimitive = requireIsPrimitive();
|
|
313
|
+
const isPlainObject = requireIsPlainObject();
|
|
314
|
+
|
|
315
|
+
const isObject = value => {
|
|
316
|
+
return (typeof value === 'object' && value !== null) || typeof value === 'function';
|
|
317
|
+
};
|
|
318
|
+
|
|
319
|
+
const isUnsafeKey = key => {
|
|
320
|
+
return key === '__proto__' || key === 'constructor' || key === 'prototype';
|
|
321
|
+
};
|
|
322
|
+
|
|
323
|
+
const validateKey = key => {
|
|
324
|
+
if (!isPrimitive(key)) {
|
|
325
|
+
throw new TypeError('Object keys must be strings or symbols');
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
if (isUnsafeKey(key)) {
|
|
329
|
+
throw new Error(`Cannot set unsafe key: "${key}"`);
|
|
330
|
+
}
|
|
331
|
+
};
|
|
332
|
+
|
|
333
|
+
const toStringKey = input => {
|
|
334
|
+
return Array.isArray(input) ? input.flat().map(String).join(',') : input;
|
|
335
|
+
};
|
|
336
|
+
|
|
337
|
+
const createMemoKey = (input, options) => {
|
|
338
|
+
if (typeof input !== 'string' || !options) return input;
|
|
339
|
+
let key = input + ';';
|
|
340
|
+
if (options.arrays !== undefined) key += `arrays=${options.arrays};`;
|
|
341
|
+
if (options.separator !== undefined) key += `separator=${options.separator};`;
|
|
342
|
+
if (options.split !== undefined) key += `split=${options.split};`;
|
|
343
|
+
if (options.merge !== undefined) key += `merge=${options.merge};`;
|
|
344
|
+
if (options.preservePaths !== undefined) key += `preservePaths=${options.preservePaths};`;
|
|
345
|
+
return key;
|
|
346
|
+
};
|
|
347
|
+
|
|
348
|
+
const memoize = (input, options, fn) => {
|
|
349
|
+
const key = toStringKey(options ? createMemoKey(input, options) : input);
|
|
350
|
+
validateKey(key);
|
|
351
|
+
|
|
352
|
+
const value = setValue.cache.get(key) || fn();
|
|
353
|
+
setValue.cache.set(key, value);
|
|
354
|
+
return value;
|
|
355
|
+
};
|
|
356
|
+
|
|
357
|
+
const splitString = (input, options = {}) => {
|
|
358
|
+
const sep = options.separator || '.';
|
|
359
|
+
const preserve = sep === '/' ? false : options.preservePaths;
|
|
360
|
+
|
|
361
|
+
if (typeof input === 'string' && preserve !== false && /\//.test(input)) {
|
|
362
|
+
return [input];
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
const parts = [];
|
|
366
|
+
let part = '';
|
|
367
|
+
|
|
368
|
+
const push = part => {
|
|
369
|
+
let number;
|
|
370
|
+
if (part.trim() !== '' && Number.isInteger((number = Number(part)))) {
|
|
371
|
+
parts.push(number);
|
|
372
|
+
} else {
|
|
373
|
+
parts.push(part);
|
|
374
|
+
}
|
|
375
|
+
};
|
|
376
|
+
|
|
377
|
+
for (let i = 0; i < input.length; i++) {
|
|
378
|
+
const value = input[i];
|
|
379
|
+
|
|
380
|
+
if (value === '\\') {
|
|
381
|
+
part += input[++i];
|
|
382
|
+
continue;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
if (value === sep) {
|
|
386
|
+
push(part);
|
|
387
|
+
part = '';
|
|
388
|
+
continue;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
part += value;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
if (part) {
|
|
395
|
+
push(part);
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
return parts;
|
|
399
|
+
};
|
|
400
|
+
|
|
401
|
+
const split = (input, options) => {
|
|
402
|
+
if (options && typeof options.split === 'function') return options.split(input);
|
|
403
|
+
if (typeof input === 'symbol') return [input];
|
|
404
|
+
if (Array.isArray(input)) return input;
|
|
405
|
+
return memoize(input, options, () => splitString(input, options));
|
|
406
|
+
};
|
|
407
|
+
|
|
408
|
+
const assignProp = (obj, prop, value, options) => {
|
|
409
|
+
validateKey(prop);
|
|
410
|
+
|
|
411
|
+
// Delete property when "value" is undefined
|
|
412
|
+
if (value === undefined) {
|
|
413
|
+
deleteProperty(obj, prop);
|
|
414
|
+
|
|
415
|
+
} else if (options && options.merge) {
|
|
416
|
+
const merge = options.merge === 'function' ? options.merge : Object.assign;
|
|
417
|
+
|
|
418
|
+
// Only merge plain objects
|
|
419
|
+
if (merge && isPlainObject(obj[prop]) && isPlainObject(value)) {
|
|
420
|
+
obj[prop] = merge(obj[prop], value);
|
|
421
|
+
} else {
|
|
422
|
+
obj[prop] = value;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
} else {
|
|
426
|
+
obj[prop] = value;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
return obj;
|
|
430
|
+
};
|
|
431
|
+
|
|
432
|
+
const setValue = (target, path, value, options) => {
|
|
433
|
+
if (!path || !isObject(target)) return target;
|
|
434
|
+
|
|
435
|
+
const keys = split(path, options);
|
|
436
|
+
let obj = target;
|
|
437
|
+
|
|
438
|
+
for (let i = 0; i < keys.length; i++) {
|
|
439
|
+
const key = keys[i];
|
|
440
|
+
const next = keys[i + 1];
|
|
441
|
+
|
|
442
|
+
validateKey(key);
|
|
443
|
+
|
|
444
|
+
if (next === undefined) {
|
|
445
|
+
assignProp(obj, key, value, options);
|
|
446
|
+
break;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
if (typeof next === 'number' && !Array.isArray(obj[key])) {
|
|
450
|
+
obj = obj[key] = [];
|
|
451
|
+
continue;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
if (!isObject(obj[key])) {
|
|
455
|
+
obj[key] = {};
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
obj = obj[key];
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
return target;
|
|
462
|
+
};
|
|
463
|
+
|
|
464
|
+
setValue.split = split;
|
|
465
|
+
setValue.cache = new Map();
|
|
466
|
+
setValue.clear = () => {
|
|
467
|
+
setValue.cache = new Map();
|
|
468
|
+
};
|
|
469
|
+
|
|
470
|
+
setValue_1 = setValue;
|
|
471
|
+
return setValue_1;
|
|
472
|
+
}
|
|
428
473
|
|
|
429
|
-
|
|
474
|
+
var setValueExports = requireSetValue();
|
|
475
|
+
const set = /*@__PURE__*/getDefaultExportFromCjs(setValueExports);
|
|
430
476
|
|
|
431
477
|
function isObject(x) {
|
|
432
478
|
return typeof x === "object" && x !== null;
|
|
@@ -437,11 +483,11 @@ function promisify(task) {
|
|
|
437
483
|
return Promise.all(task.map((x) => promisify(x))).then(resolve).catch(reject);
|
|
438
484
|
} else {
|
|
439
485
|
if (task.destroyed) {
|
|
440
|
-
resolve(
|
|
486
|
+
resolve(undefined);
|
|
441
487
|
return;
|
|
442
488
|
}
|
|
443
489
|
task.on("finish", () => {
|
|
444
|
-
resolve(
|
|
490
|
+
resolve(undefined);
|
|
445
491
|
}).on("error", (err) => {
|
|
446
492
|
reject(err);
|
|
447
493
|
});
|
|
@@ -458,16 +504,10 @@ function isTsLang(lang) {
|
|
|
458
504
|
return lang === "ts";
|
|
459
505
|
}
|
|
460
506
|
|
|
461
|
-
var __defProp = Object.defineProperty;
|
|
462
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
463
|
-
var __publicField = (obj, key, value) => {
|
|
464
|
-
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
465
|
-
return value;
|
|
466
|
-
};
|
|
467
507
|
class GlobsSet {
|
|
508
|
+
includeSet;
|
|
509
|
+
excludeSet;
|
|
468
510
|
constructor() {
|
|
469
|
-
__publicField(this, "includeSet");
|
|
470
|
-
__publicField(this, "excludeSet");
|
|
471
511
|
this.includeSet = /* @__PURE__ */ new Set();
|
|
472
512
|
this.excludeSet = /* @__PURE__ */ new Set();
|
|
473
513
|
}
|
|
@@ -497,7 +537,7 @@ class GlobsSet {
|
|
|
497
537
|
}
|
|
498
538
|
|
|
499
539
|
function isStream(stream, { checkOpen = true } = {}) {
|
|
500
|
-
return stream !== null && typeof stream === "object" && (stream.writable || stream.readable || !checkOpen || stream.writable ===
|
|
540
|
+
return stream !== null && typeof stream === "object" && (stream.writable || stream.readable || !checkOpen || stream.writable === undefined && stream.readable === undefined) && typeof stream.pipe === "function";
|
|
501
541
|
}
|
|
502
542
|
|
|
503
543
|
function normalizePlugin(plugin) {
|
|
@@ -537,7 +577,7 @@ async function getTasks(options) {
|
|
|
537
577
|
const enableLess = Boolean(preprocessorOptions?.less);
|
|
538
578
|
function resolvePipes(plugins, type) {
|
|
539
579
|
const newPlugins = gulpChain(plugins, type);
|
|
540
|
-
if (newPlugins ===
|
|
580
|
+
if (newPlugins === undefined) {
|
|
541
581
|
return plugins;
|
|
542
582
|
}
|
|
543
583
|
return newPlugins.map((x) => normalizePlugin(x)).filter((x) => x);
|
|
@@ -546,7 +586,7 @@ async function getTasks(options) {
|
|
|
546
586
|
typescriptOptions = {
|
|
547
587
|
tsConfigFileName: "tsconfig.json"
|
|
548
588
|
};
|
|
549
|
-
} else if (isObject(typescriptOptions) && typescriptOptions.tsConfigFileName ===
|
|
589
|
+
} else if (isObject(typescriptOptions) && typescriptOptions.tsConfigFileName === undefined) {
|
|
550
590
|
typescriptOptions.tsConfigFileName = "tsconfig.json";
|
|
551
591
|
}
|
|
552
592
|
const enableTs = Boolean(typescriptOptions);
|
|
@@ -605,7 +645,7 @@ async function getTasks(options) {
|
|
|
605
645
|
pipes.push(transformJs({
|
|
606
646
|
babelParserOptions: !enableTs && isTs ? {
|
|
607
647
|
plugins: ["typescript"]
|
|
608
|
-
} :
|
|
648
|
+
} : undefined
|
|
609
649
|
}));
|
|
610
650
|
if (loadTs) {
|
|
611
651
|
pipes.push(rename__default({
|
|
@@ -658,11 +698,11 @@ async function getTasks(options) {
|
|
|
658
698
|
if (loadSass) {
|
|
659
699
|
pipes.push(sass.sync(
|
|
660
700
|
// @ts-ignore
|
|
661
|
-
typeof preprocessorOptions?.sass === "boolean" ?
|
|
701
|
+
typeof preprocessorOptions?.sass === "boolean" ? undefined : preprocessorOptions?.sass
|
|
662
702
|
).on("error", sass.logError));
|
|
663
703
|
}
|
|
664
704
|
if (loadLess) {
|
|
665
|
-
pipes.push(less__default(typeof preprocessorOptions?.less === "boolean" ?
|
|
705
|
+
pipes.push(less__default(typeof preprocessorOptions?.less === "boolean" ? undefined : preprocessorOptions?.less));
|
|
666
706
|
}
|
|
667
707
|
if (postcssOptions) {
|
|
668
708
|
pipes.push(postcssrc__default(postcssOptions?.plugins, postcssOptions?.options));
|
|
@@ -770,7 +810,7 @@ function _defu(baseObject, defaults, namespace = ".", merger) {
|
|
|
770
810
|
continue;
|
|
771
811
|
}
|
|
772
812
|
const value = baseObject[key];
|
|
773
|
-
if (value === null || value ===
|
|
813
|
+
if (value === null || value === undefined) {
|
|
774
814
|
continue;
|
|
775
815
|
}
|
|
776
816
|
if (merger && merger(object, key, value, namespace)) {
|
|
@@ -799,7 +839,7 @@ function createDefu(merger) {
|
|
|
799
839
|
}
|
|
800
840
|
const defu = createDefu();
|
|
801
841
|
|
|
802
|
-
const version = "
|
|
842
|
+
const version = "4.0.0-alpha.0";
|
|
803
843
|
|
|
804
844
|
async function createBuilder(options) {
|
|
805
845
|
let postcssOptionsFromConfig;
|
|
@@ -838,7 +878,7 @@ async function createBuilder(options) {
|
|
|
838
878
|
debug("del end");
|
|
839
879
|
}
|
|
840
880
|
return {
|
|
841
|
-
watcher:
|
|
881
|
+
watcher: undefined,
|
|
842
882
|
async build() {
|
|
843
883
|
if (clean2) {
|
|
844
884
|
await doClean();
|