Skip to content

Commit 504d9ce

Browse files
committed
attempt to fix image check script
1 parent 6b17213 commit 504d9ce

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

scripts/src/image-check.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
import {glob} from 'glob';
8+
import glob from 'glob';
99
import fs from 'node:fs/promises';
1010
import path from 'node:path';
1111

@@ -16,7 +16,11 @@ async function main() {
1616
const missingAssets = [];
1717
const queue = [];
1818

19-
const files = await glob('../docs/**/*.md', {});
19+
const files = await glob(
20+
path.join(import.meta.dirname, '../../docs/**/*.{md,mdx}'),
21+
{}
22+
);
23+
console.warn(files);
2024

2125
for (const file of files) {
2226
const entry = (async () => {
@@ -37,7 +41,7 @@ async function main() {
3741
for (const {imagePath, markdownPath} of assets) {
3842
try {
3943
await fs.stat(
40-
path.join(import.meta.dirname, '../website/static', imagePath)
44+
path.join(import.meta.dirname, '../../website/static', imagePath)
4145
);
4246
} catch {
4347
missingAssets.push({imagePath, markdownPath});

0 commit comments

Comments
 (0)