(examples: ReadonlyArray<Domain.File>)
| 336 | * Generates an entry point file for the given examples. |
| 337 | */ |
| 338 | const getExamplesEntryPoint = (examples: ReadonlyArray<Domain.File>) => |
| 339 | Effect.gen(function*() { |
| 340 | const config = yield* Configuration.Configuration |
| 341 | const path = yield* Path.Path |
| 342 | const content = examples.map((example) => `import './${path.basename(example.path, ".ts")}'`) |
| 343 | .join("\n") |
| 344 | return new Domain.File( |
| 345 | path.normalize(path.join(config.outDir, "examples", "index.ts")), |
| 346 | `${content}\n`, |
| 347 | true // make the file overwritable |
| 348 | ) |
| 349 | }) |
| 350 | |
| 351 | /** |
| 352 | * Removes the "examples" directory from the output directory specified in the configuration. |
no test coverage detected