Skip to content

Commit

Permalink
fix: take srcDir and outDir from docgen.json config file into account (
Browse files Browse the repository at this point in the history
…#74)

Co-authored-by: martinjeromelouis <[email protected]>
Co-authored-by: Giulio Canti <[email protected]>
  • Loading branch information
3 people authored Aug 30, 2024
1 parent 85e58a6 commit 5b888e5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/wicked-ghosts-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@effect/docgen": patch
---

srcDir and outDir fields in docgen.json are currently ignored. With this patch, they are taken into account
12 changes: 12 additions & 0 deletions src/Configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,20 @@ export const load = (args: {
)
)

const srcDir = config.pipe(
Option.flatMapNullable((config) => config.srcDir),
Option.getOrElse(() => args.srcDir)
)

const outDir = config.pipe(
Option.flatMapNullable((config) => config.outDir),
Option.getOrElse(() => args.outDir)
)

Check failure on line 297 in src/Configuration.ts

View workflow job for this annotation

GitHub Actions / build (20.9.0)

Extra whitespace(s)
return Configuration.of({
...args,
srcDir,
outDir,
projectName,
projectHomepage,
exclude,
Expand Down

0 comments on commit 5b888e5

Please sign in to comment.