File tree 1 file changed +15
-1
lines changed
1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ export const svg2Font = async (options: SvgToCssOptions) => {
65
65
await fs . ensureDir ( options . dist as any ) ;
66
66
67
67
const svgFiles = await filterSvgFiles ( src ) ;
68
+ const svgFileSuccess : string [ ] = [ ] ;
68
69
69
70
if ( svgFiles . length === 0 ) return ;
70
71
@@ -79,6 +80,8 @@ export const svg2Font = async (options: SvgToCssOptions) => {
79
80
80
81
// Validate, clean up, fix palette and optimise
81
82
await iconSet . forEach ( async ( name , type ) => {
83
+ svgFileSuccess . push ( name ) ;
84
+
82
85
if ( type !== 'icon' ) {
83
86
return ;
84
87
}
@@ -188,7 +191,18 @@ export type T${prefix} = ${[...svgMonochrome, ...svgMultichrome]
188
191
) ;
189
192
}
190
193
191
- log . log ( color . green ( 'SvgTocss:CLI:SUCCESS:' ) ) ;
194
+ log . log ( '✅' , color . green ( 'Generate icon SUCCESS' ) ) ;
195
+ log . log ( color . yellowBright ( svgFileSuccess . join ( ' | ' ) ) ) ;
196
+ console . log ( ) ;
197
+ if ( svgFiles . length !== svgFileSuccess . length ) {
198
+ log . log ( '❌' , color . red ( 'Generate icon ERROR' ) ) ;
199
+ log . log (
200
+ color . yellowBright (
201
+ 'Can not generate with some icon like be: error svg content, svg content have image, etc...' ,
202
+ ) ,
203
+ ) ;
204
+ }
205
+
192
206
console . log ( ) ;
193
207
} catch ( error ) {
194
208
log . log ( color . red ( 'SvgTocss:CLI:ERR:' ) , error ) ;
You can’t perform that action at this time.
0 commit comments