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 = {
1919 plugins : path . resolve ( __dirname , '../content/plugins' ) ,
2020} ;
2121
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+
2231async function main ( ) {
2332 for ( const type of types ) {
2433 const outputDir = pathMap [ type ] ;
@@ -56,13 +65,17 @@ async function main() {
5665 repo : htmlUrl ,
5766 } ) ;
5867 } else {
59- // TODO we need other categories for loaders
60- headmatter = yamlHeadmatter ( {
68+ let basic = {
6169 title : title ,
6270 source : url ,
6371 edit : editUrl ,
6472 repo : htmlUrl ,
65- } ) ;
73+ } ;
74+
75+ if ( loaderGroup [ packageName ] ) {
76+ basic . group = loaderGroup [ packageName ] ;
77+ }
78+ headmatter = yamlHeadmatter ( basic ) ;
6679 }
6780
6881 const response = await fetch ( url ) ;
You can’t perform that action at this time.
0 commit comments