Skip to content

Commit

Permalink
fix(barrels): fix glob pattern to discover nested directory
Browse files Browse the repository at this point in the history
  • Loading branch information
Romakita committed Dec 23, 2024
1 parent 0436a72 commit 8a755bf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/barrels/bin/generate-barrel.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {writeFile} from "node:fs/promises";
import path, {dirname, join} from "node:path";
import {join as joinPosix} from "node:path/posix";

import {globby} from "globby";

Expand Down Expand Up @@ -28,7 +29,7 @@ export async function generateBarrels({exclude, directory, cwd}) {
const directories = (
await globby(
directory.map((d) => {
return join(d, "*");
return joinPosix(d, "*");
}),
{
cwd
Expand Down

0 comments on commit 8a755bf

Please sign in to comment.