@@ -2,7 +2,6 @@ import { existsSync, mkdirSync, writeFileSync } from 'fs';
2
2
import { resolve } from 'path' ;
3
3
4
4
import { getLatestVersionSoundList } from './shared/features/sounds' ;
5
- import { SEARCH_INCLUDE_PATTERNS } from './shared/features/sounds/filterIncludePatterns' ;
6
5
7
6
function writeJSONFile (
8
7
dir : string ,
@@ -17,7 +16,6 @@ function writeJSONFile(
17
16
const dataDir = resolve ( __dirname , 'server' , 'public' , 'data' ) ;
18
17
19
18
const soundListPath = 'soundList.json' ;
20
- const filteredSoundListPath = 'filteredSoundList.json' ;
21
19
22
20
// Try to create the output directory if it doesn't exist
23
21
try {
29
27
}
30
28
31
29
// If the files already exist, exit early
32
- const files = [ soundListPath , filteredSoundListPath ] . map ( ( fileName ) =>
33
- resolve ( dataDir , fileName ) ,
34
- ) ;
30
+ const files = [ soundListPath ] . map ( ( fileName ) => resolve ( dataDir , fileName ) ) ;
35
31
36
32
if ( files . every ( ( file ) => existsSync ( file ) ) ) {
37
33
console . log ( 'Sound data files already exist; skipping generation.' ) ;
@@ -44,16 +40,5 @@ console.log('Generating sound data files...');
44
40
// Filter the list to only include sounds that match the chosen patterns
45
41
// (defined in the shared/ module)
46
42
getLatestVersionSoundList ( ) . then ( ( soundList ) => {
47
- const filteredSoundList : string [ ] = Object . keys ( soundList )
48
- . filter ( ( sound ) =>
49
- SEARCH_INCLUDE_PATTERNS . some ( ( pattern ) =>
50
- new RegExp ( pattern ) . test ( sound ) ,
51
- ) ,
52
- )
53
- . sort ( ( a , b ) =>
54
- a . localeCompare ( b , undefined , { sensitivity : 'base' , numeric : true } ) ,
55
- ) ;
56
-
57
43
writeJSONFile ( dataDir , soundListPath , soundList ) ;
58
- writeJSONFile ( dataDir , filteredSoundListPath , filteredSoundList ) ;
59
44
} ) ;
0 commit comments