@@ -46,7 +46,8 @@ export const generateUseIcons = async (
4646
4747 skippedIconsHtmlAll = Array . from ( new Set ( skippedIconsHtmlAll ) ) ;
4848 console . warn (
49- "[Ionic Dev] Cannot generate these icon inputs. Please check these: " + skippedIconsHtmlAll . join ( ', ' ) ,
49+ "[Ionic Dev] Cannot generate these icon inputs. Please check these: " +
50+ skippedIconsHtmlAll . join ( ", " ) ,
5051 ) ;
5152 ionicComponentsAll = Array . from ( new Set ( ionicComponentsAll ) ) ;
5253
@@ -127,26 +128,29 @@ function detectIonicComponentsAndIcons(htmlAsString: string, filePath: string) {
127128 */
128129 const iconNameMatch = skippedIcon . match ( iconNameRegex ) ;
129130
130- const deepGetIconConditional = ( ast : typeof boundNameAttribute . value . ast , icons : string [ ] ) : string [ ] => {
131- if ( ast . trueExp . type === 'LiteralPrimitive' ) {
131+ const deepGetIconConditional = (
132+ ast : typeof boundNameAttribute . value . ast ,
133+ icons : string [ ] ,
134+ ) : string [ ] => {
135+ if ( ast . trueExp . type === "LiteralPrimitive" ) {
132136 icons . push ( ast . trueExp . value ) ;
133- } else if ( ast . trueExp . type === ' Conditional' ) {
137+ } else if ( ast . trueExp . type === " Conditional" ) {
134138 return deepGetIconConditional ( ast . trueExp , icons ) ;
135- } else if ( ast . falseExp . type === ' LiteralPrimitive' ) {
139+ } else if ( ast . falseExp . type === " LiteralPrimitive" ) {
136140 icons . push ( ast . falseExp . value ) ;
137- } else if ( ast . falseExp . type === ' Conditional' ) {
141+ } else if ( ast . falseExp . type === " Conditional" ) {
138142 return deepGetIconConditional ( ast . falseExp , icons ) ;
139143 } else {
140144 skippedIconsHtml . push ( skippedIcon ) ;
141145 }
142146 return icons ;
143- }
147+ } ;
144148
145149 if ( iconNameMatch ) {
146150 if ( ! ionIcons . includes ( iconNameMatch [ 1 ] ) ) {
147151 ionIcons . push ( iconNameMatch [ 1 ] ) ;
148152 }
149- } else if ( boundNameAttribute . value . ast . type === ' Conditional' ) {
153+ } else if ( boundNameAttribute . value . ast . type === " Conditional" ) {
150154 deepGetIconConditional ( boundNameAttribute . value . ast , ionIcons ) ;
151155 } else {
152156 // IonIcon name is a calculated value from a variable or function.
0 commit comments