[R] Refactor exclude list

pull/214/head
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)
}));
const commentOnlyList = JSON.parse(fs.readFileSync(path.join(projectRoot, DATA_DIR, "comment-only.json")).toString()) as String[];
const excludeList = commentOnlyList.concat(JSON.parse(fs.readFileSync(path.join(projectRoot, DATA_DIR, 'exclude.json')).toString()) as String[]);
interface HData {
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 {
id: string