1+ import type { CoreConfig } from '../models/src/index.js' ;
12import bundleStatsPlugin from './src' ;
23import { MinMax } from './src/lib/runner/types' ;
34import { BundleStatsAuditOptions } from './src/lib/types' ;
@@ -749,7 +750,7 @@ const TREE_AUDITS: BundleStatsAuditOptions[] = [
749750 } ,
750751] ;
751752
752- const config = {
753+ const config : CoreConfig = {
753754 plugins : [
754755 await bundleStatsPlugin ( {
755756 artifactsPaths :
@@ -762,8 +763,86 @@ const config = {
762763 ...INSIGHT_AUDITS ,
763764 ...TREE_AUDITS ,
764765 ] ,
766+ groups : [
767+ {
768+ slug : 'selection-group' ,
769+ title : '🎯 Selection' ,
770+ description :
771+ 'Demonstrates different selection modes and pattern matching for bundle analysis.' ,
772+ refs : SELECTION_AUDITS . filter ( audit => audit . slug ) . map ( audit => ( {
773+ slug : audit . slug ! ,
774+ weight : 1 ,
775+ } ) ) ,
776+ } ,
777+ {
778+ slug : 'scoring-group' ,
779+ title : '📏 Scoring' ,
780+ description :
781+ 'Shows scoring mechanisms including thresholds, penalties, and size constraints.' ,
782+ refs : [ ...SCORING_AUDITS , ...SCORING_PENALTY_AUDITS ]
783+ . filter ( audit => audit . slug )
784+ . map ( audit => ( {
785+ slug : audit . slug ! ,
786+ weight : 1 ,
787+ } ) ) ,
788+ } ,
789+ {
790+ slug : 'insights-group' ,
791+ title : '📊 Insights Table' ,
792+ description :
793+ 'Configures insights tables with grouping, pruning, and visualization options.' ,
794+ refs : INSIGHT_AUDITS . filter ( audit => audit . slug ) . map ( audit => ( {
795+ slug : audit . slug ! ,
796+ weight : 1 ,
797+ } ) ) ,
798+ } ,
799+ {
800+ slug : 'tree-group' ,
801+ title : '🌳 Dependency Tree' ,
802+ description :
803+ 'Demonstrates dependency tree configurations with grouping and pruning strategies.' ,
804+ refs : TREE_AUDITS . filter ( audit => audit . slug ) . map ( audit => ( {
805+ slug : audit . slug ! ,
806+ weight : 1 ,
807+ } ) ) ,
808+ } ,
809+ ] ,
765810 } ) ,
766811 ] ,
812+ categories : [
813+ {
814+ slug : 'performance' ,
815+ title : '⚡ Performance' ,
816+ description :
817+ 'Comprehensive bundle performance analysis including selection, scoring, insights, and dependency trees.' ,
818+ refs : [
819+ {
820+ type : 'group' as const ,
821+ plugin : 'bundle-stats' ,
822+ slug : 'selection-group' ,
823+ weight : 1 ,
824+ } ,
825+ {
826+ type : 'group' as const ,
827+ plugin : 'bundle-stats' ,
828+ slug : 'scoring-group' ,
829+ weight : 2 ,
830+ } ,
831+ {
832+ type : 'group' as const ,
833+ plugin : 'bundle-stats' ,
834+ slug : 'insights-group' ,
835+ weight : 1 ,
836+ } ,
837+ {
838+ type : 'group' as const ,
839+ plugin : 'bundle-stats' ,
840+ slug : 'tree-group' ,
841+ weight : 1 ,
842+ } ,
843+ ] ,
844+ } ,
845+ ] ,
767846} ;
768847
769848export default ( async ( ) => {
0 commit comments