@@ -14,7 +14,7 @@ import {
1414 replaceNames ,
1515 replaceNamesArray , replaceNoColor ,
1616 replaceSingleIconContent ,
17- replaceSize ,
17+ replaceSize , replaceSummaryIcon ,
1818 replaceSvgComponents ,
1919 replaceToDependsComments ,
2020 replaceToOneComments ,
@@ -132,7 +132,8 @@ export const generateComponent = (data: XmlData, config: Config) => {
132132 let typeDefinitionFile = getTemplate ( 'Icon.d.ts' ) ;
133133
134134 typeDefinitionFile = replaceNames ( typeDefinitionFile , names ) ;
135- fs . writeFileSync ( path . join ( saveDir , 'Icon.d.ts' ) , typeDefinitionFile ) ;
135+ typeDefinitionFile = replaceSummaryIcon ( typeDefinitionFile , config . summary_component_name ) ;
136+ fs . writeFileSync ( path . join ( saveDir , config . summary_component_name + '.d.ts' ) , typeDefinitionFile ) ;
136137 }
137138
138139 if ( config . generate_mode === GENERATE_MODE . allInOne ) {
@@ -143,7 +144,9 @@ export const generateComponent = (data: XmlData, config: Config) => {
143144 iconFile = replaceNoColor ( iconFile ) ;
144145 }
145146
146- fs . writeFileSync ( path . join ( saveDir , 'Icon' + jsxExtension ) , iconFile ) ;
147+ iconFile = replaceSummaryIcon ( iconFile , config . summary_component_name ) ;
148+
149+ fs . writeFileSync ( path . join ( saveDir , config . summary_component_name + jsxExtension ) , iconFile ) ;
147150
148151 console . log ( `\n${ colors . green ( '√' ) } All icons have putted into dir: ${ colors . green ( config . save_dir ) } \n` ) ;
149152} ;
0 commit comments