@@ -23,12 +23,12 @@ export function fontawesomeSubset(): Plugin {
2323 "src/webfonts-generated" ,
2424 {
2525 targetFormats : [ "woff2" ] ,
26- } ,
26+ }
2727 ) ;
2828
2929 const end = performance . now ( ) ;
3030 console . log (
31- `Creating fontawesome subset took ${ Math . round ( end - start ) } ms` ,
31+ `Creating fontawesome subset took ${ Math . round ( end - start ) } ms`
3232 ) ;
3333 } ,
3434 } ;
@@ -94,11 +94,11 @@ function getFontawesomeConfig(debug = false): FontawesomeConfig {
9494 "./src" ,
9595 ( filename ) =>
9696 ! filename . endsWith ( "fontawesome-5.scss" ) &&
97- ! filename . endsWith ( "fontawesome-6.scss" ) , //ignore our own css
97+ ! filename . endsWith ( "fontawesome-6.scss" ) //ignore our own css
9898 ) ;
9999 const staticFiles = findAllFiles (
100100 "./static" ,
101- ( filename ) => filename . endsWith ( ".html" ) || filename . endsWith ( ".css" ) ,
101+ ( filename ) => filename . endsWith ( ".html" ) || filename . endsWith ( ".css" )
102102 ) ;
103103
104104 const allFiles = [ ...srcFiles , ...staticFiles ] ;
@@ -127,12 +127,11 @@ function getFontawesomeConfig(debug = false): FontawesomeConfig {
127127 const brands = usedClasses . filter ( ( it ) => iconSet . brands . includes ( it ) ) ;
128128
129129 const leftOvers = icons . filter (
130- ( it ) =>
131- ! ( solid . includes ( it ) || regular . includes ( it ) || brands . includes ( it ) ) ,
130+ ( it ) => ! ( solid . includes ( it ) || regular . includes ( it ) || brands . includes ( it ) )
132131 ) ;
133132 if ( leftOvers . length !== 0 ) {
134133 throw new Error (
135- "Fontawesome failed with unknown icons: " + leftOvers . toString ( ) ,
134+ "Fontawesome failed with unknown icons: " + leftOvers . toString ( )
136135 ) ;
137136 }
138137
@@ -143,7 +142,7 @@ function getFontawesomeConfig(debug = false): FontawesomeConfig {
143142 . filter ( ( it ) => usedClasses . filter ( ( c ) => it [ 1 ] . includes ( c ) ) . length > 0 )
144143 . map ( ( it ) => it [ 0 ] )
145144 . filter ( ( it ) => it !== "brands" )
146- . join ( ", " ) ,
145+ . join ( ", " )
147146 ) ;
148147
149148 console . debug (
@@ -152,7 +151,7 @@ function getFontawesomeConfig(debug = false): FontawesomeConfig {
152151 regular,
153152 solid,
154153 brands,
155- } ) ,
154+ } )
156155 ) ;
157156 console . debug ( "Detected fontawesome classes in" , Date . now ( ) - time , "ms" ) ;
158157 }
@@ -176,7 +175,7 @@ function toFileAndDir(dir: string, file: string): FileObject {
176175
177176function findAllFiles (
178177 dir : string ,
179- filter : ( filename : string ) => boolean = ( _it ) : boolean => true ,
178+ filter : ( filename : string ) => boolean = ( _it ) : boolean => true
180179) : string [ ] {
181180 const files = fs
182181 . readdirSync ( dir )
@@ -197,7 +196,7 @@ function findAllFiles(
197196function parseIcons ( iconSet : string ) : string [ ] {
198197 const require = createRequire ( import . meta. url ) ;
199198 const path = require . resolve (
200- `@fortawesome/fontawesome-free/js/${ iconSet } .js` ,
199+ `@fortawesome/fontawesome-free/js/${ iconSet } .js`
201200 ) ;
202201 const file : string | null = fs . readFileSync ( path ) . toString ( ) ;
203202
0 commit comments