-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.ts
24 lines (21 loc) · 783 Bytes
/
app.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import { ObjType } from "@/type";
import { makeMarkDown } from "@/utils/lib";
import { getYozmList } from "@/yozm";
import { getKFAList } from "@/korean-fe-article";
import { getFilteredMediumList } from "@/medium";
import { showPreview } from "@/utils/preview";
const main = async () => {
const mediumList: ObjType[] = (await getFilteredMediumList()).slice(0, 4);
const kfaList: ObjType[] = (await getKFAList()).slice(0, 2);
const yozmList: ObjType[] = (await getYozmList()).slice(0, 2);
if (process.env.PREVIEW_KFA) {
showPreview(kfaList);
} else if (process.env.PREVIEW_MEDIUM) {
showPreview(mediumList);
} else if (process.env.PREVIEW_YOZM) {
showPreview(yozmList);
} else {
makeMarkDown([...mediumList, ...kfaList, ...yozmList]);
}
};
main();