1
0
mirror of https://github.com/one-among-us/data.git synced 2024-11-10 13:24:50 +08:00

[R] Refactor exclude list

This commit is contained in:
Elihuso Quigley 2024-04-04 19:33:47 +08:00
parent d38c43ef05
commit 188569aa91
4 changed files with 17 additions and 6 deletions

View File

@ -1,3 +0,0 @@
[
"tdor"
]

View File

@ -1 +0,0 @@
[]

7
data/hdata.json Normal file
View File

@ -0,0 +1,7 @@
{
"commentOnly": [
"tdor"
],
"exclude": [],
"notShowOnHome": []
}

View File

@ -27,8 +27,16 @@ const people = fs.readdirSync(peopleDir).map(person => ({
distPath: path.join(projectRoot, DIST_DIR, PEOPLE_DIR, person) distPath: path.join(projectRoot, DIST_DIR, PEOPLE_DIR, person)
})); }));
const commentOnlyList = JSON.parse(fs.readFileSync(path.join(projectRoot, DATA_DIR, "comment-only.json")).toString()) as String[]; interface HData {
const excludeList = commentOnlyList.concat(JSON.parse(fs.readFileSync(path.join(projectRoot, DATA_DIR, 'exclude.json')).toString()) as String[]); commentOnly: string[],
exclude: string[],
notShowOnHome: string[]
}
const hdata = JSON.parse(fs.readFileSync(path.join(projectRoot, DATA_DIR, "hdata.json")).toString()) as HData;
const commentOnlyList = hdata.commentOnly;
const excludeList = hdata.exclude;
const notShowOnHomeList = hdata.notShowOnHome;
interface PeopleMeta { interface PeopleMeta {
id: string id: string