Skip to content

Commit af1d750

Browse files
committed
chore: update
1 parent 2554710 commit af1d750

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

src/index.ts

+15-1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ export const svg2Font = async (options: SvgToCssOptions) => {
6565
await fs.ensureDir(options.dist as any);
6666

6767
const svgFiles = await filterSvgFiles(src);
68+
const svgFileSuccess: string[] = [];
6869

6970
if (svgFiles.length === 0) return;
7071

@@ -79,6 +80,8 @@ export const svg2Font = async (options: SvgToCssOptions) => {
7980

8081
// Validate, clean up, fix palette and optimise
8182
await iconSet.forEach(async (name, type) => {
83+
svgFileSuccess.push(name);
84+
8285
if (type !== 'icon') {
8386
return;
8487
}
@@ -188,7 +191,18 @@ export type T${prefix} = ${[...svgMonochrome, ...svgMultichrome]
188191
);
189192
}
190193

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+
192206
console.log();
193207
} catch (error) {
194208
log.log(color.red('SvgTocss:CLI:ERR:'), error);

0 commit comments

Comments
 (0)