Skip to content

Commit 4fa878f

Browse files
authored
fix(generate-examples-index): suppy POSIX paths to Globby even on Windows (#1047)
The `globby` package can only handle POSIX style paths, which means that it breaks on Windows when using `path.join()` instead of `path.posix.join()`. modified: src/generate-examples-index/index.ts
1 parent 58f001c commit 4fa878f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/generate-examples-index/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as cheerio from "cheerio";
22
import fs from "fs";
33
import util from "util";
44
import yargs from "yargs";
5-
import { join } from "path";
5+
import { posix } from "path";
66
import { resolve } from "path";
77

88
import {
@@ -165,7 +165,7 @@ function lintExample(path: string, page: cheerio.CheerioAPI): boolean {
165165
(
166166
await (
167167
await import("globby")
168-
).globby(join(pathsConfig.page.local, "**/*.html"))
168+
).globby(posix.join(pathsConfig.page.local, "**/*.html"))
169169
).map(async (pagePath): Promise<any> => {
170170
const html = await readFile(pagePath, "utf-8");
171171
const $page = cheerio.load(html);

0 commit comments

Comments
 (0)