@@ -137,8 +137,7 @@ async function validateLayouts(): Promise<void> {
137137 //no files not defined in LayoutsList
138138 const additionalLayoutFiles = fs
139139 . readdirSync ( "./static/layouts" )
140- . map ( ( it ) => it . substring ( 0 , it . length - 5 ) )
141- . filter ( ( it ) => ! LayoutsList . some ( ( layout ) => layout === it ) ) ;
140+ . filter ( ( it ) => ! LayoutsList . some ( ( layout ) => layout + ".json" === it ) ) ;
142141 if ( additionalLayoutFiles . length !== 0 ) {
143142 additionalLayoutFiles . forEach ( ( it ) => problems . add ( "_additional" , it ) ) ;
144143 }
@@ -287,8 +286,7 @@ async function validateLanguages(): Promise<void> {
287286
288287 //no files not defined in LanguageList
289288 fs . readdirSync ( "./static/languages" )
290- . map ( ( it ) => it . substring ( 0 , it . length - 5 ) )
291- . filter ( ( it ) => ! LanguageList . some ( ( language ) => language === it ) )
289+ . filter ( ( it ) => ! LanguageList . some ( ( language ) => language + ".json" === it ) )
292290 . forEach ( ( it ) => problems . add ( "_additional" , it ) ) ;
293291
294292 //check groups
@@ -381,18 +379,20 @@ async function validateThemes(): Promise<void> {
381379 } ) ;
382380
383381 //no missing files
384- const themeFiles = fs
385- . readdirSync ( "./static/themes" )
386- . map ( ( it ) => it . substring ( 0 , it . length - 4 ) ) ;
382+ const themeFiles = fs . readdirSync ( "./static/themes" ) ;
387383
388384 //missing theme files
389- ThemesList . filter ( ( it ) => ! themeFiles . includes ( it . name ) ) . forEach ( ( it ) =>
390- problems . add ( it . name , `missing file frontend/static/themes/${ it . name } .css` )
385+ ThemesList . filter ( ( it ) => ! themeFiles . includes ( it . name + ".css" ) ) . forEach (
386+ ( it ) =>
387+ problems . add (
388+ it . name ,
389+ `missing file frontend/static/themes/${ it . name } .css`
390+ )
391391 ) ;
392392
393393 //additional theme files
394394 themeFiles
395- . filter ( ( it ) => ! ThemesList . some ( ( theme ) => theme . name === it ) )
395+ . filter ( ( it ) => ! ThemesList . some ( ( theme ) => theme . name + ".css" === it ) )
396396 . forEach ( ( it ) => problems . add ( "_additional" , it ) ) ;
397397
398398 console . log ( problems . toString ( ) ) ;
0 commit comments