File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,15 @@ const pathMap = {
19
19
plugins : path . resolve ( __dirname , '../content/plugins' ) ,
20
20
} ;
21
21
22
+ const loaderGroup = {
23
+ 'css-loader' : 'CSS' ,
24
+ 'less-loader' : 'CSS' ,
25
+ 'postcss-loader' : 'CSS' ,
26
+ 'sass-loader' : 'CSS' ,
27
+ 'style-loader' : 'CSS' ,
28
+ 'stylus-loader' : 'CSS' ,
29
+ } ;
30
+
22
31
async function main ( ) {
23
32
for ( const type of types ) {
24
33
const outputDir = pathMap [ type ] ;
@@ -56,13 +65,17 @@ async function main() {
56
65
repo : htmlUrl ,
57
66
} ) ;
58
67
} else {
59
- // TODO we need other categories for loaders
60
- headmatter = yamlHeadmatter ( {
68
+ let basic = {
61
69
title : title ,
62
70
source : url ,
63
71
edit : editUrl ,
64
72
repo : htmlUrl ,
65
- } ) ;
73
+ } ;
74
+
75
+ if ( loaderGroup [ packageName ] ) {
76
+ basic . group = loaderGroup [ packageName ] ;
77
+ }
78
+ headmatter = yamlHeadmatter ( basic ) ;
66
79
}
67
80
68
81
const response = await fetch ( url ) ;
You can’t perform that action at this time.
0 commit comments