Skip to content

Commit

Permalink
fix glob pattern on windows (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
matheuspuel authored Nov 20, 2023
1 parent a3b1a09 commit bcaf971
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/silent-windows-sniff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@effect/docgen": patch
---

fix glob pattern on windows
4 changes: 2 additions & 2 deletions src/Core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import * as Process from "./Process.js"
const readSourceFiles = Effect.gen(function*(_) {
const config = yield* _(Config.Config)
const fs = yield* _(FileSystem.FileSystem)
const path = yield* _(Path.Path)
const path = yield* _(Path.Path, Effect.provide(Path.layerPosix))
const paths = yield* _(
fs.glob(path.normalize(path.join(config.srcDir, "**", "*.ts")), config.exclude)
)
Expand Down Expand Up @@ -399,7 +399,7 @@ const getModuleMarkdownFiles = (modules: ReadonlyArray<Domain.Module>) =>
const writeMarkdown = (files: ReadonlyArray<FileSystem.File>) =>
Effect.gen(function*(_) {
const config = yield* _(Config.Config)
const path = yield* _(Path.Path)
const path = yield* _(Path.Path, Effect.provide(Path.layerPosix))
const fileSystem = yield* _(FileSystem.FileSystem)
const pattern = path.normalize(path.join(config.outDir, "**/*.ts.md"))
yield* _(Effect.logDebug(`Deleting ${chalk.black(pattern)}...`))
Expand Down

0 comments on commit bcaf971

Please sign in to comment.