1- import { codeToHtml } from 'shiki'
1+ import { codeToHtml } from 'shiki' ;
22
33import { getHookFile , getHooks , matchJsdoc , parseHookJsdoc } from '../../src/utils' ;
44
@@ -30,7 +30,7 @@ export default {
3030 acc += usage . description ;
3131 }
3232 return acc ;
33- } , '' )
33+ } , '' ) ;
3434
3535 const usage = await codeToHtml ( usages , {
3636 lang : 'typescript' ,
@@ -41,7 +41,6 @@ export default {
4141 defaultColor : false
4242 } ) ;
4343
44-
4544 const example = await codeToHtml ( `import { ${ hook } } from '@siberiacancode/reactuse';` , {
4645 lang : 'typescript' ,
4746 themes : {
@@ -66,15 +65,19 @@ export default {
6665 } )
6766 ) ;
6867
69- // const features = params
70- // .filter(Boolean)
71- // .map((param) => {
72- // return `\n- title: ${param?.params.name}\n details: ${param?.params.description}\n link: /functions/hooks/${param?.params.name}`;
73- // })
74- // .join(' ');
75- // console.log('@', features);
68+ const pages = params . filter ( Boolean ) ;
69+
70+ console . log ( '\nHooks injection report\n' ) ;
71+ console . log ( '\x1b[32mInjected: ' + pages . length + '\x1b[0m' ) ;
72+ console . log ( '\x1b[33mSkipped: ' + ( hooks . length - pages . length ) + '\x1b[0m' ) ;
73+ console . log ( 'Total: ' + hooks . length ) ;
7674
77- return params . filter ( Boolean ) ;
75+ // console.table([
76+ // { Status: 'Injected', Count: injected },
77+ // { Status: 'Skipped', Count: skipped },
78+ // { Status: 'Total', Count: total }
79+ // ]);
80+
81+ return pages ;
7882 }
7983} ;
80-
0 commit comments