in script/build.ts [28:45]
async function build() {
const modeTypes = fs.readdirSync(dataDir)
for (const type of modeTypes) {
const toSkip = SKIP.filter(skip => skip.type === type).map(skip => skip.name)
let collection = await getModeCollectionForType(type, toSkip)
const {isValid, errors} = collection.validate()
if (!isValid) {
logError(errors.join('\n'))
process.exit(1)
}
await writeModeOutput(collection)
}
await writeMainTsIndex(modeTypes)
}