mirror of
https://github.com/one-among-us/data.git
synced 2025-04-19 04:51:09 +08:00
[+] departure list
This commit is contained in:
parent
2cf1116875
commit
5d7bd658d0
@ -70,6 +70,7 @@ function buildPeopleInfoAndList() {
|
||||
const peopleList: PeopleMeta[] = [];
|
||||
const peopleHomeList: PeopleMeta[] = [];
|
||||
const birthdayList = [] as [string, string][]
|
||||
const departureList = [] as [string, string][]
|
||||
|
||||
// For each person
|
||||
for (const { dirname, srcPath, distPath } of people) {
|
||||
@ -106,6 +107,12 @@ function buildPeopleInfoAndList() {
|
||||
}
|
||||
}
|
||||
|
||||
if (info.id && info.info && info.info.died) {
|
||||
if (!actualHide.includes(info.id)) {
|
||||
departureList.push([info.id, info.info.died])
|
||||
}
|
||||
}
|
||||
|
||||
// Convert info dict to [[key, value], ...]
|
||||
// And add info k-v pairs from markdown to the info object in json5
|
||||
info.info = [...Object.entries(mdMeta.info ?? {}), ...Object.entries(info.info ?? {})]
|
||||
@ -156,6 +163,7 @@ function buildPeopleInfoAndList() {
|
||||
fs.writeFileSync(path.join(projectRoot, DIST_DIR, `people-list${lang}.json`), JSON.stringify(peopleList));
|
||||
fs.writeFileSync(path.join(projectRoot, DIST_DIR, `people-home-list${lang}.json`), JSON.stringify(peopleHomeList));
|
||||
fs.writeFileSync(path.join(projectRoot, DIST_DIR, 'birthday-list.json'), JSON.stringify(birthdayList));
|
||||
fs.writeFileSync(path.join(projectRoot, DIST_DIR, 'departure-list.json'), JSON.stringify(departureList));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user