()
| 107 | } |
| 108 | |
| 109 | function buildManifest() { |
| 110 | const dirs = problemDirs(); |
| 111 | return readProblems(sourceFile) |
| 112 | .filter((item) => /^lc\d+$/.test(item.pid) && Number.isInteger(item.num)) |
| 113 | .sort((a, b) => a.num - b.num) |
| 114 | .map((item) => { |
| 115 | const repoPath = findRepoPath(item.num, dirs); |
| 116 | return { |
| 117 | leetcodeId: item.num, |
| 118 | sourcePid: item.pid, |
| 119 | slug: item.slug, |
| 120 | titleZh: item.title, |
| 121 | difficulty: difficulty(item.diff), |
| 122 | categoryZh: item.cat, |
| 123 | topicsZh: topics(item.cat), |
| 124 | status: "site-animation", |
| 125 | repoPath, |
| 126 | gifPath: findFirstGif(repoPath), |
| 127 | siteUrl: `${siteBase}/${item.slug}`, |
| 128 | }; |
| 129 | }); |
| 130 | } |
| 131 | |
| 132 | function renderProblemIndex(items) { |
| 133 | const rows = items.map((item) => { |
no test coverage detected