File tree Expand file tree Collapse file tree 2 files changed +14
-8
lines changed Expand file tree Collapse file tree 2 files changed +14
-8
lines changed Original file line number Diff line number Diff line change 9
9
"detectors" : {
10
10
"js" : [
11
11
" [...document.querySelectorAll('*')].map((el) => Boolean(el.__vue__?.$options.isOruga)).filter(Boolean).length" ,
12
- " [...document.querySelectorAll('*')].map((el) => Boolean(el.__vueParentComponent?.ctx.$options.isOruga )).filter(Boolean).length"
12
+ " [...document.querySelectorAll('*')].map((el) => Boolean(el.__vue_app__?.config?.globalProperties?.$oruga )).filter(Boolean).length"
13
13
]
14
14
}
15
15
},
69
69
" <link [^>]*href=\" [^\" ]+tailwindcss(?:\\ .min)?\\ .css" ,
70
70
" <(?:div|button|a) [^>]*class=\" [^\" ]*(?:sm:|md:|lg:|xl:|hover:|active:|focus:|disabled:|visited:|first:|last:|odd:|even:|group-hover:|focus-within:)"
71
71
]
72
- }
72
+ },
73
+ "priority" : -1
73
74
},
74
75
"buefy" : {
75
76
"metas" : {
Original file line number Diff line number Diff line change @@ -36,12 +36,17 @@ exports.getFramework = async function (context) {
36
36
}
37
37
38
38
exports . getUI = async function ( context ) {
39
- for ( const ui of Object . keys ( detectors . uis ) ) {
40
- if ( await isMatching ( detectors . uis [ ui ] . detectors , context ) ) {
41
- return detectors . uis [ ui ] . metas
42
- }
43
- }
44
- return null
39
+ const uis = new Set ( )
40
+
41
+ await Promise . all (
42
+ Object . keys ( detectors . uis ) . map ( async ( ui ) => {
43
+ if ( await isMatching ( detectors . uis [ ui ] . detectors , context ) ) {
44
+ uis . add ( detectors . uis [ ui ] )
45
+ }
46
+ } )
47
+ )
48
+
49
+ return Array . from ( uis ) . sort ( ( a , b ) => ( b . priority ?? 1 ) - ( a . priority ?? 1 ) ) [ 0 ]
45
50
}
46
51
47
52
exports . getPlugins = async function ( context ) {
You can’t perform that action at this time.
0 commit comments