@xiaohe01/stylelint-config 2.2.1 → 2.3.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 +95 -67
- package/dist/index.d.cts +11 -7
- package/dist/index.d.mts +11 -7
- package/dist/index.d.ts +11 -7
- package/dist/index.mjs +95 -67
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -14,6 +14,9 @@ const GLOB_ALL = [
|
|
|
14
14
|
];
|
|
15
15
|
|
|
16
16
|
function core(options = {}) {
|
|
17
|
+
const {
|
|
18
|
+
vue = false
|
|
19
|
+
} = options;
|
|
17
20
|
return [
|
|
18
21
|
{
|
|
19
22
|
name: "xiaohe/core/rules",
|
|
@@ -108,6 +111,28 @@ function core(options = {}) {
|
|
|
108
111
|
]
|
|
109
112
|
}
|
|
110
113
|
],
|
|
114
|
+
...vue ? {
|
|
115
|
+
"selector-pseudo-class-no-unknown": [
|
|
116
|
+
true,
|
|
117
|
+
{
|
|
118
|
+
ignorePseudoClasses: [
|
|
119
|
+
"deep",
|
|
120
|
+
"global",
|
|
121
|
+
"slotted"
|
|
122
|
+
]
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
"selector-pseudo-element-no-unknown": [
|
|
126
|
+
true,
|
|
127
|
+
{
|
|
128
|
+
ignorePseudoElements: [
|
|
129
|
+
"v-deep",
|
|
130
|
+
"v-global",
|
|
131
|
+
"v-slotted"
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
]
|
|
135
|
+
} : {},
|
|
111
136
|
...options.overrides
|
|
112
137
|
}
|
|
113
138
|
}
|
|
@@ -128,11 +153,6 @@ function css(options = {}) {
|
|
|
128
153
|
|
|
129
154
|
function html(options = {}) {
|
|
130
155
|
return [
|
|
131
|
-
{
|
|
132
|
-
name: "xiaohe/html/setup",
|
|
133
|
-
files: GLOB_HTML,
|
|
134
|
-
customSyntax: "postcss-html"
|
|
135
|
-
},
|
|
136
156
|
{
|
|
137
157
|
name: "xiaohe/html/rules",
|
|
138
158
|
files: GLOB_HTML,
|
|
@@ -144,18 +164,17 @@ function html(options = {}) {
|
|
|
144
164
|
}
|
|
145
165
|
|
|
146
166
|
function scss(options = {}) {
|
|
167
|
+
const {
|
|
168
|
+
vue = false,
|
|
169
|
+
uniapp = false
|
|
170
|
+
} = options;
|
|
147
171
|
return [
|
|
148
|
-
{
|
|
149
|
-
name: "xiaohe/scss/setup",
|
|
150
|
-
files: GLOB_SCSS,
|
|
151
|
-
customSyntax: "postcss-scss",
|
|
152
|
-
plugins: [
|
|
153
|
-
"stylelint-scss"
|
|
154
|
-
]
|
|
155
|
-
},
|
|
156
172
|
{
|
|
157
173
|
name: "xiaohe/scss/rules",
|
|
158
|
-
files:
|
|
174
|
+
files: [
|
|
175
|
+
...GLOB_SCSS,
|
|
176
|
+
...vue ? GLOB_VUE : []
|
|
177
|
+
],
|
|
159
178
|
rules: {
|
|
160
179
|
"annotation-no-unknown": null,
|
|
161
180
|
"at-rule-no-unknown": null,
|
|
@@ -186,57 +205,60 @@ function scss(options = {}) {
|
|
|
186
205
|
"scss/operator-no-newline-after": true,
|
|
187
206
|
"scss/operator-no-newline-before": true,
|
|
188
207
|
"scss/operator-no-unspaced": true,
|
|
208
|
+
...uniapp ? {
|
|
209
|
+
"scss/load-partial-extension": "always"
|
|
210
|
+
} : {},
|
|
189
211
|
...options.overrides
|
|
190
212
|
}
|
|
191
213
|
}
|
|
192
214
|
];
|
|
193
215
|
}
|
|
194
216
|
|
|
195
|
-
function
|
|
217
|
+
function setup(options = {}) {
|
|
196
218
|
const {
|
|
197
|
-
scss = false
|
|
219
|
+
scss = false,
|
|
220
|
+
html = false,
|
|
221
|
+
vue = false
|
|
198
222
|
} = options;
|
|
199
|
-
|
|
200
|
-
|
|
223
|
+
const overrides = [];
|
|
224
|
+
if (html) {
|
|
225
|
+
overrides.push({
|
|
226
|
+
name: "xiaohe/html/setup",
|
|
227
|
+
files: GLOB_HTML,
|
|
228
|
+
customSyntax: "postcss-html"
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
if (vue) {
|
|
232
|
+
overrides.push({
|
|
201
233
|
name: "xiaohe/vue/setup",
|
|
202
234
|
files: GLOB_VUE,
|
|
203
|
-
customSyntax: "postcss-html"
|
|
204
|
-
|
|
235
|
+
customSyntax: "postcss-html",
|
|
236
|
+
plugins: [
|
|
237
|
+
...scss ? [
|
|
238
|
+
"stylelint-scss"
|
|
239
|
+
] : []
|
|
240
|
+
]
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
if (scss) {
|
|
244
|
+
overrides.push({
|
|
245
|
+
name: "xiaohe/scss/setup",
|
|
246
|
+
files: GLOB_SCSS,
|
|
247
|
+
customSyntax: "postcss-scss",
|
|
248
|
+
plugins: [
|
|
249
|
+
"stylelint-scss"
|
|
250
|
+
]
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
return overrides;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
function vue(options = {}) {
|
|
257
|
+
return [
|
|
205
258
|
{
|
|
206
259
|
name: "xiaohe/vue/rules",
|
|
207
260
|
files: GLOB_VUE,
|
|
208
261
|
rules: {
|
|
209
|
-
"function-no-unknown": [
|
|
210
|
-
true,
|
|
211
|
-
{
|
|
212
|
-
ignoreFunctions: [
|
|
213
|
-
"v-bind"
|
|
214
|
-
]
|
|
215
|
-
}
|
|
216
|
-
],
|
|
217
|
-
"selector-pseudo-class-no-unknown": [
|
|
218
|
-
true,
|
|
219
|
-
{
|
|
220
|
-
ignorePseudoClasses: [
|
|
221
|
-
"deep",
|
|
222
|
-
"global",
|
|
223
|
-
"slotted"
|
|
224
|
-
]
|
|
225
|
-
}
|
|
226
|
-
],
|
|
227
|
-
"selector-pseudo-element-no-unknown": [
|
|
228
|
-
true,
|
|
229
|
-
{
|
|
230
|
-
ignorePseudoElements: [
|
|
231
|
-
"v-deep",
|
|
232
|
-
"v-global",
|
|
233
|
-
"v-slotted"
|
|
234
|
-
]
|
|
235
|
-
}
|
|
236
|
-
],
|
|
237
|
-
...scss ? {
|
|
238
|
-
"function-no-unknown": null
|
|
239
|
-
} : {},
|
|
240
262
|
...options.overrides
|
|
241
263
|
}
|
|
242
264
|
}
|
|
@@ -254,6 +276,9 @@ const VUE_PACKAGES = [
|
|
|
254
276
|
"vitepress",
|
|
255
277
|
"@slidev/cli"
|
|
256
278
|
];
|
|
279
|
+
const UNIAPP_PACKAGES = [
|
|
280
|
+
"@dcloudio/uni-app"
|
|
281
|
+
];
|
|
257
282
|
|
|
258
283
|
function castArray(value) {
|
|
259
284
|
return Array.isArray(value) ? value : [value];
|
|
@@ -264,20 +289,31 @@ function isPkgExists(pkg) {
|
|
|
264
289
|
|
|
265
290
|
function defineConfig(options = {}, ...userOverrides) {
|
|
266
291
|
const {
|
|
267
|
-
css: enableCss = true,
|
|
268
|
-
html: enableHtml = true,
|
|
269
292
|
scss: enableScss = isPkgExists(SCSS_PACKAGES),
|
|
270
|
-
|
|
293
|
+
html: enableHtml = true,
|
|
294
|
+
vue: enableVue = isPkgExists(VUE_PACKAGES),
|
|
295
|
+
uniapp: enableUniApp = isPkgExists(UNIAPP_PACKAGES)
|
|
271
296
|
} = options;
|
|
272
297
|
const overrides = [
|
|
298
|
+
...setup({
|
|
299
|
+
scss: !!enableScss,
|
|
300
|
+
html: !!enableHtml,
|
|
301
|
+
vue: !!enableVue
|
|
302
|
+
}),
|
|
273
303
|
...core({
|
|
274
|
-
overrides: getOverrides(options.core)
|
|
304
|
+
overrides: getOverrides(options.core),
|
|
305
|
+
vue: !!enableVue
|
|
306
|
+
}),
|
|
307
|
+
...css({
|
|
308
|
+
overrides: getOverrides(options.css)
|
|
275
309
|
})
|
|
276
310
|
];
|
|
277
|
-
if (
|
|
311
|
+
if (enableScss) {
|
|
278
312
|
overrides.push(
|
|
279
|
-
...
|
|
280
|
-
overrides: getOverrides(options.
|
|
313
|
+
...scss({
|
|
314
|
+
overrides: getOverrides(options.scss),
|
|
315
|
+
vue: !!enableVue,
|
|
316
|
+
uniapp: enableUniApp
|
|
281
317
|
})
|
|
282
318
|
);
|
|
283
319
|
}
|
|
@@ -288,18 +324,10 @@ function defineConfig(options = {}, ...userOverrides) {
|
|
|
288
324
|
})
|
|
289
325
|
);
|
|
290
326
|
}
|
|
291
|
-
if (enableScss) {
|
|
292
|
-
overrides.push(
|
|
293
|
-
...scss({
|
|
294
|
-
overrides: getOverrides(options.scss)
|
|
295
|
-
})
|
|
296
|
-
);
|
|
297
|
-
}
|
|
298
327
|
if (enableVue) {
|
|
299
328
|
overrides.push(
|
|
300
329
|
...vue({
|
|
301
|
-
overrides: getOverrides(options.vue)
|
|
302
|
-
scss: !!enableScss
|
|
330
|
+
overrides: getOverrides(options.vue)
|
|
303
331
|
})
|
|
304
332
|
);
|
|
305
333
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -14,11 +14,15 @@ interface OptionsConfig {
|
|
|
14
14
|
*/
|
|
15
15
|
core?: OptionsOverrides;
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* CSS rules.
|
|
18
|
+
*/
|
|
19
|
+
css?: OptionsOverrides;
|
|
20
|
+
/**
|
|
21
|
+
* Enable Scss support.
|
|
18
22
|
*
|
|
19
|
-
* @default
|
|
23
|
+
* @default auto-detect based on the dependencies
|
|
20
24
|
*/
|
|
21
|
-
|
|
25
|
+
scss?: boolean | OptionsOverrides;
|
|
22
26
|
/**
|
|
23
27
|
* Enable HTML support.
|
|
24
28
|
*
|
|
@@ -26,17 +30,17 @@ interface OptionsConfig {
|
|
|
26
30
|
*/
|
|
27
31
|
html?: boolean | OptionsOverrides;
|
|
28
32
|
/**
|
|
29
|
-
* Enable
|
|
33
|
+
* Enable Vue support.
|
|
30
34
|
*
|
|
31
35
|
* @default auto-detect based on the dependencies
|
|
32
36
|
*/
|
|
33
|
-
|
|
37
|
+
vue?: boolean | OptionsOverrides;
|
|
34
38
|
/**
|
|
35
|
-
* Enable
|
|
39
|
+
* Enable uniapp support.
|
|
36
40
|
*
|
|
37
41
|
* @default auto-detect based on the dependencies
|
|
38
42
|
*/
|
|
39
|
-
|
|
43
|
+
uniapp?: boolean;
|
|
40
44
|
}
|
|
41
45
|
|
|
42
46
|
declare function defineConfig(options?: OptionsConfig & Omit<Config, "overrides">, ...userOverrides: ConfigOverride[]): Config;
|
package/dist/index.d.mts
CHANGED
|
@@ -14,11 +14,15 @@ interface OptionsConfig {
|
|
|
14
14
|
*/
|
|
15
15
|
core?: OptionsOverrides;
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* CSS rules.
|
|
18
|
+
*/
|
|
19
|
+
css?: OptionsOverrides;
|
|
20
|
+
/**
|
|
21
|
+
* Enable Scss support.
|
|
18
22
|
*
|
|
19
|
-
* @default
|
|
23
|
+
* @default auto-detect based on the dependencies
|
|
20
24
|
*/
|
|
21
|
-
|
|
25
|
+
scss?: boolean | OptionsOverrides;
|
|
22
26
|
/**
|
|
23
27
|
* Enable HTML support.
|
|
24
28
|
*
|
|
@@ -26,17 +30,17 @@ interface OptionsConfig {
|
|
|
26
30
|
*/
|
|
27
31
|
html?: boolean | OptionsOverrides;
|
|
28
32
|
/**
|
|
29
|
-
* Enable
|
|
33
|
+
* Enable Vue support.
|
|
30
34
|
*
|
|
31
35
|
* @default auto-detect based on the dependencies
|
|
32
36
|
*/
|
|
33
|
-
|
|
37
|
+
vue?: boolean | OptionsOverrides;
|
|
34
38
|
/**
|
|
35
|
-
* Enable
|
|
39
|
+
* Enable uniapp support.
|
|
36
40
|
*
|
|
37
41
|
* @default auto-detect based on the dependencies
|
|
38
42
|
*/
|
|
39
|
-
|
|
43
|
+
uniapp?: boolean;
|
|
40
44
|
}
|
|
41
45
|
|
|
42
46
|
declare function defineConfig(options?: OptionsConfig & Omit<Config, "overrides">, ...userOverrides: ConfigOverride[]): Config;
|
package/dist/index.d.ts
CHANGED
|
@@ -14,11 +14,15 @@ interface OptionsConfig {
|
|
|
14
14
|
*/
|
|
15
15
|
core?: OptionsOverrides;
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* CSS rules.
|
|
18
|
+
*/
|
|
19
|
+
css?: OptionsOverrides;
|
|
20
|
+
/**
|
|
21
|
+
* Enable Scss support.
|
|
18
22
|
*
|
|
19
|
-
* @default
|
|
23
|
+
* @default auto-detect based on the dependencies
|
|
20
24
|
*/
|
|
21
|
-
|
|
25
|
+
scss?: boolean | OptionsOverrides;
|
|
22
26
|
/**
|
|
23
27
|
* Enable HTML support.
|
|
24
28
|
*
|
|
@@ -26,17 +30,17 @@ interface OptionsConfig {
|
|
|
26
30
|
*/
|
|
27
31
|
html?: boolean | OptionsOverrides;
|
|
28
32
|
/**
|
|
29
|
-
* Enable
|
|
33
|
+
* Enable Vue support.
|
|
30
34
|
*
|
|
31
35
|
* @default auto-detect based on the dependencies
|
|
32
36
|
*/
|
|
33
|
-
|
|
37
|
+
vue?: boolean | OptionsOverrides;
|
|
34
38
|
/**
|
|
35
|
-
* Enable
|
|
39
|
+
* Enable uniapp support.
|
|
36
40
|
*
|
|
37
41
|
* @default auto-detect based on the dependencies
|
|
38
42
|
*/
|
|
39
|
-
|
|
43
|
+
uniapp?: boolean;
|
|
40
44
|
}
|
|
41
45
|
|
|
42
46
|
declare function defineConfig(options?: OptionsConfig & Omit<Config, "overrides">, ...userOverrides: ConfigOverride[]): Config;
|
package/dist/index.mjs
CHANGED
|
@@ -12,6 +12,9 @@ const GLOB_ALL = [
|
|
|
12
12
|
];
|
|
13
13
|
|
|
14
14
|
function core(options = {}) {
|
|
15
|
+
const {
|
|
16
|
+
vue = false
|
|
17
|
+
} = options;
|
|
15
18
|
return [
|
|
16
19
|
{
|
|
17
20
|
name: "xiaohe/core/rules",
|
|
@@ -106,6 +109,28 @@ function core(options = {}) {
|
|
|
106
109
|
]
|
|
107
110
|
}
|
|
108
111
|
],
|
|
112
|
+
...vue ? {
|
|
113
|
+
"selector-pseudo-class-no-unknown": [
|
|
114
|
+
true,
|
|
115
|
+
{
|
|
116
|
+
ignorePseudoClasses: [
|
|
117
|
+
"deep",
|
|
118
|
+
"global",
|
|
119
|
+
"slotted"
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
"selector-pseudo-element-no-unknown": [
|
|
124
|
+
true,
|
|
125
|
+
{
|
|
126
|
+
ignorePseudoElements: [
|
|
127
|
+
"v-deep",
|
|
128
|
+
"v-global",
|
|
129
|
+
"v-slotted"
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
]
|
|
133
|
+
} : {},
|
|
109
134
|
...options.overrides
|
|
110
135
|
}
|
|
111
136
|
}
|
|
@@ -126,11 +151,6 @@ function css(options = {}) {
|
|
|
126
151
|
|
|
127
152
|
function html(options = {}) {
|
|
128
153
|
return [
|
|
129
|
-
{
|
|
130
|
-
name: "xiaohe/html/setup",
|
|
131
|
-
files: GLOB_HTML,
|
|
132
|
-
customSyntax: "postcss-html"
|
|
133
|
-
},
|
|
134
154
|
{
|
|
135
155
|
name: "xiaohe/html/rules",
|
|
136
156
|
files: GLOB_HTML,
|
|
@@ -142,18 +162,17 @@ function html(options = {}) {
|
|
|
142
162
|
}
|
|
143
163
|
|
|
144
164
|
function scss(options = {}) {
|
|
165
|
+
const {
|
|
166
|
+
vue = false,
|
|
167
|
+
uniapp = false
|
|
168
|
+
} = options;
|
|
145
169
|
return [
|
|
146
|
-
{
|
|
147
|
-
name: "xiaohe/scss/setup",
|
|
148
|
-
files: GLOB_SCSS,
|
|
149
|
-
customSyntax: "postcss-scss",
|
|
150
|
-
plugins: [
|
|
151
|
-
"stylelint-scss"
|
|
152
|
-
]
|
|
153
|
-
},
|
|
154
170
|
{
|
|
155
171
|
name: "xiaohe/scss/rules",
|
|
156
|
-
files:
|
|
172
|
+
files: [
|
|
173
|
+
...GLOB_SCSS,
|
|
174
|
+
...vue ? GLOB_VUE : []
|
|
175
|
+
],
|
|
157
176
|
rules: {
|
|
158
177
|
"annotation-no-unknown": null,
|
|
159
178
|
"at-rule-no-unknown": null,
|
|
@@ -184,57 +203,60 @@ function scss(options = {}) {
|
|
|
184
203
|
"scss/operator-no-newline-after": true,
|
|
185
204
|
"scss/operator-no-newline-before": true,
|
|
186
205
|
"scss/operator-no-unspaced": true,
|
|
206
|
+
...uniapp ? {
|
|
207
|
+
"scss/load-partial-extension": "always"
|
|
208
|
+
} : {},
|
|
187
209
|
...options.overrides
|
|
188
210
|
}
|
|
189
211
|
}
|
|
190
212
|
];
|
|
191
213
|
}
|
|
192
214
|
|
|
193
|
-
function
|
|
215
|
+
function setup(options = {}) {
|
|
194
216
|
const {
|
|
195
|
-
scss = false
|
|
217
|
+
scss = false,
|
|
218
|
+
html = false,
|
|
219
|
+
vue = false
|
|
196
220
|
} = options;
|
|
197
|
-
|
|
198
|
-
|
|
221
|
+
const overrides = [];
|
|
222
|
+
if (html) {
|
|
223
|
+
overrides.push({
|
|
224
|
+
name: "xiaohe/html/setup",
|
|
225
|
+
files: GLOB_HTML,
|
|
226
|
+
customSyntax: "postcss-html"
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
if (vue) {
|
|
230
|
+
overrides.push({
|
|
199
231
|
name: "xiaohe/vue/setup",
|
|
200
232
|
files: GLOB_VUE,
|
|
201
|
-
customSyntax: "postcss-html"
|
|
202
|
-
|
|
233
|
+
customSyntax: "postcss-html",
|
|
234
|
+
plugins: [
|
|
235
|
+
...scss ? [
|
|
236
|
+
"stylelint-scss"
|
|
237
|
+
] : []
|
|
238
|
+
]
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
if (scss) {
|
|
242
|
+
overrides.push({
|
|
243
|
+
name: "xiaohe/scss/setup",
|
|
244
|
+
files: GLOB_SCSS,
|
|
245
|
+
customSyntax: "postcss-scss",
|
|
246
|
+
plugins: [
|
|
247
|
+
"stylelint-scss"
|
|
248
|
+
]
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
return overrides;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
function vue(options = {}) {
|
|
255
|
+
return [
|
|
203
256
|
{
|
|
204
257
|
name: "xiaohe/vue/rules",
|
|
205
258
|
files: GLOB_VUE,
|
|
206
259
|
rules: {
|
|
207
|
-
"function-no-unknown": [
|
|
208
|
-
true,
|
|
209
|
-
{
|
|
210
|
-
ignoreFunctions: [
|
|
211
|
-
"v-bind"
|
|
212
|
-
]
|
|
213
|
-
}
|
|
214
|
-
],
|
|
215
|
-
"selector-pseudo-class-no-unknown": [
|
|
216
|
-
true,
|
|
217
|
-
{
|
|
218
|
-
ignorePseudoClasses: [
|
|
219
|
-
"deep",
|
|
220
|
-
"global",
|
|
221
|
-
"slotted"
|
|
222
|
-
]
|
|
223
|
-
}
|
|
224
|
-
],
|
|
225
|
-
"selector-pseudo-element-no-unknown": [
|
|
226
|
-
true,
|
|
227
|
-
{
|
|
228
|
-
ignorePseudoElements: [
|
|
229
|
-
"v-deep",
|
|
230
|
-
"v-global",
|
|
231
|
-
"v-slotted"
|
|
232
|
-
]
|
|
233
|
-
}
|
|
234
|
-
],
|
|
235
|
-
...scss ? {
|
|
236
|
-
"function-no-unknown": null
|
|
237
|
-
} : {},
|
|
238
260
|
...options.overrides
|
|
239
261
|
}
|
|
240
262
|
}
|
|
@@ -252,6 +274,9 @@ const VUE_PACKAGES = [
|
|
|
252
274
|
"vitepress",
|
|
253
275
|
"@slidev/cli"
|
|
254
276
|
];
|
|
277
|
+
const UNIAPP_PACKAGES = [
|
|
278
|
+
"@dcloudio/uni-app"
|
|
279
|
+
];
|
|
255
280
|
|
|
256
281
|
function castArray(value) {
|
|
257
282
|
return Array.isArray(value) ? value : [value];
|
|
@@ -262,20 +287,31 @@ function isPkgExists(pkg) {
|
|
|
262
287
|
|
|
263
288
|
function defineConfig(options = {}, ...userOverrides) {
|
|
264
289
|
const {
|
|
265
|
-
css: enableCss = true,
|
|
266
|
-
html: enableHtml = true,
|
|
267
290
|
scss: enableScss = isPkgExists(SCSS_PACKAGES),
|
|
268
|
-
|
|
291
|
+
html: enableHtml = true,
|
|
292
|
+
vue: enableVue = isPkgExists(VUE_PACKAGES),
|
|
293
|
+
uniapp: enableUniApp = isPkgExists(UNIAPP_PACKAGES)
|
|
269
294
|
} = options;
|
|
270
295
|
const overrides = [
|
|
296
|
+
...setup({
|
|
297
|
+
scss: !!enableScss,
|
|
298
|
+
html: !!enableHtml,
|
|
299
|
+
vue: !!enableVue
|
|
300
|
+
}),
|
|
271
301
|
...core({
|
|
272
|
-
overrides: getOverrides(options.core)
|
|
302
|
+
overrides: getOverrides(options.core),
|
|
303
|
+
vue: !!enableVue
|
|
304
|
+
}),
|
|
305
|
+
...css({
|
|
306
|
+
overrides: getOverrides(options.css)
|
|
273
307
|
})
|
|
274
308
|
];
|
|
275
|
-
if (
|
|
309
|
+
if (enableScss) {
|
|
276
310
|
overrides.push(
|
|
277
|
-
...
|
|
278
|
-
overrides: getOverrides(options.
|
|
311
|
+
...scss({
|
|
312
|
+
overrides: getOverrides(options.scss),
|
|
313
|
+
vue: !!enableVue,
|
|
314
|
+
uniapp: enableUniApp
|
|
279
315
|
})
|
|
280
316
|
);
|
|
281
317
|
}
|
|
@@ -286,18 +322,10 @@ function defineConfig(options = {}, ...userOverrides) {
|
|
|
286
322
|
})
|
|
287
323
|
);
|
|
288
324
|
}
|
|
289
|
-
if (enableScss) {
|
|
290
|
-
overrides.push(
|
|
291
|
-
...scss({
|
|
292
|
-
overrides: getOverrides(options.scss)
|
|
293
|
-
})
|
|
294
|
-
);
|
|
295
|
-
}
|
|
296
325
|
if (enableVue) {
|
|
297
326
|
overrides.push(
|
|
298
327
|
...vue({
|
|
299
|
-
overrides: getOverrides(options.vue)
|
|
300
|
-
scss: !!enableScss
|
|
328
|
+
overrides: getOverrides(options.vue)
|
|
301
329
|
})
|
|
302
330
|
);
|
|
303
331
|
}
|