File tree 1 file changed +15
-8
lines changed
packages/docs/.vuepress/theme-coreui/src/client/components
1 file changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -15,16 +15,18 @@ export default defineComponent({
15
15
file: String ,
16
16
},
17
17
setup(props ) {
18
-
19
18
if (typeof window !== ' undefined' ) {
20
- window .Prism = window .Prism || {};
21
- window .Prism .manual = true ;
19
+ window .Prism = window .Prism || {}
20
+ window .Prism .manual = true
22
21
}
23
22
24
- const files = import .meta .glob (` ../../../../../../../node_modules/@coreui/coreui/scss/**/*.scss ` , {
25
- as: ' raw' ,
26
- eager: true ,
27
- })
23
+ const files = import .meta .glob (
24
+ ` ../../../../../../../node_modules/@coreui/coreui/scss/**/*.scss ` ,
25
+ {
26
+ as: ' raw' ,
27
+ eager: true ,
28
+ },
29
+ )
28
30
const file = files [` ../../../../../../../node_modules/@coreui/coreui/scss/${props .file } ` ]
29
31
30
32
const captureStart = ` // scss-docs-start ${props .capture } `
@@ -40,8 +42,13 @@ export default defineComponent({
40
42
.replaceAll (' \n @' , ' \n @' ),
41
43
Prism .languages .scss ,
42
44
' scss' ,
43
- )
45
+ )
44
46
: null
47
+
48
+ if (code === null ) {
49
+ console .error (` Can't find "${props .capture }" ` )
50
+ }
51
+
45
52
return {
46
53
code ,
47
54
}
You can’t perform that action at this time.
0 commit comments