Skip to content

Commit

Permalink
#27: Introduced README.md automatic generation (Docs As Code) for Syn…
Browse files Browse the repository at this point in the history
…ergy.Documentation nuget package
  • Loading branch information
MarcinCelej committed Jan 6, 2024
1 parent c9b07a4 commit d5e40d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# Technical Debt for Synergy.Documentation

Total: 3

## [README.Generate.cs](../../Docs/README.Generate.cs)
- TODO: Marcin Celej [from: Marcin Celej on: 06-01-2024]: Add here reading file path through [SourceFile] from Synergy.Documentation.Annotations
Total: 2

## [TodoPattern.cs](../../../Synergy.Documentation/Todos/Patterns/TodoPattern.cs)
- TODO: Marcin Celej [from: Marcin Celej on: 14-04-2023]: Add way to exclude some files from the scan - by path
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@ namespace Synergy.Documentation.Tests.Docs;
partial class README
{
private static readonly CodeFile readmeFile = CodeFolder.Current().Up(2).File($"{nameof(README)}.md");
private readonly CodeFolder architectureFolder = CodeFolder.Current().Up().Sub("Architecture");

// TODO: Marcin Celej [from: Marcin Celej on: 06-01-2024]: Add here reading file path through [SourceFile] from Synergy.Documentation.Annotations
private CodeFile ApiFile => CodeFile.For<Architecture.Public.Api>();
private Markdown.Link ApiLink => Markdown.Link.To(this.ApiFile).RelativeFrom(readmeFile);

private CodeFile ApiForSynergyDocs => this.architectureFolder.Sub("Public").File("Api.of.Synergy.Documentation.verified.md");
private CodeFile ApiForSynergyDocs => this.ApiFile.Folder.File("Api.of.Synergy.Documentation.verified.md");
private Markdown.Link ApiForSynergyDocsLink => Markdown.Link.To(this.ApiForSynergyDocs).RelativeFrom(readmeFile);

private CodeFile PackageFile => CodeFile.For<Package>();
Expand All @@ -23,13 +21,13 @@ partial class README
private CodeFile TodosFile => CodeFile.For<Architecture.Debt.Todos>();
private Markdown.Link TodosLink => Markdown.Link.To(this.TodosFile).RelativeFrom(README.readmeFile);

private CodeFile TodosDebt => this.architectureFolder.Sub("Debt").File("Todos.Technical.Debt.verified.md");
private CodeFile TodosDebt => this.TodosFile.Folder.File("Todos.Technical.Debt.verified.md");
private Markdown.Link TodosDebtLink => Markdown.Link.To(this.TodosDebt).RelativeFrom(README.readmeFile);

private CodeFile RelationsFile => CodeFile.For<Relations>();
private Markdown.Link RelationsLink => Markdown.Link.To(this.RelationsFile).RelativeFrom(README.readmeFile);

private CodeFile RelationsOfMarkdown => this.architectureFolder.Sub("Dependencies").File("Relations.of.Markdown.verified.md");
private CodeFile RelationsOfMarkdown => this.RelationsFile.Folder.File("Relations.of.Markdown.verified.md");
private Markdown.Link RelationsOfMarkdownLink => Markdown.Link.To(this.RelationsOfMarkdown).RelativeFrom(README.readmeFile);

[Fact]
Expand Down

0 comments on commit d5e40d6

Please sign in to comment.