Skip to content

Commit

Permalink
Update Docusaurus templates and generate solution relations
Browse files Browse the repository at this point in the history
  • Loading branch information
ignatandrei committed Mar 11, 2024
1 parent 68f0c2e commit 2654e97
Show file tree
Hide file tree
Showing 12 changed files with 50 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ static async Task<int> Main(string[] args)
//rootCommand.Add(cmdAnalyzeBranch);
if(args.Length == 0)
{
args = ["-h"];
args = ["-h"];
args = new[] { "generateFiles",
"--folder", @"D:\gth\PackageAnalyzer\src\NetPackageAnalyzer\",
"--where", @"D:\gth\PackageAnalyzer\src\documentation1\",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public override async Task GenerateNow(string folder, string where)

file = Path.Combine(folderResults, "ProjectRelation.md");
ArgumentNullException.ThrowIfNull(projectsDict);
await File.WriteAllTextAsync(file, await generator.Generate_ProjectsRelations(projectsDict));
await File.WriteAllTextAsync(file, await generator.Generate_SolutionRelations(projectsDict));

var folderProjects = Path.Combine(folderResults, "Projects");
if (!Directory.Exists(folderProjects))
Expand All @@ -68,7 +68,7 @@ public override async Task GenerateNow(string folder, string where)
var projects = $$"""
{
"label": "Projects",
"position": 1,
"position": 1000,
"link": {
"type": "generated-index"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@
<None Remove="Templates\ProjectPackages.cshtml" />
<None Remove="Templates\ProjectRelations.cshtml" />
<None Remove="Templates\ProjectRoot.cshtml" />
<None Remove="Templates\ProjectsRelations.cshtml" />
<None Remove="Templates\SimpleDisplayProjectWithReferencesProject.cshtml" />
<None Remove="Templates\SolutionRelations.cshtml" />
<None Remove="Templates\TestProjects.cshtml" />
</ItemGroup>
<ItemGroup>
Expand All @@ -77,8 +77,8 @@
<Watch Remove="Templates\ProjectPackages.cshtml" />
<Watch Remove="Templates\ProjectRelations.cshtml" />
<Watch Remove="Templates\ProjectRoot.cshtml" />
<Watch Remove="Templates\ProjectsRelations.cshtml" />
<Watch Remove="Templates\SimpleDisplayProjectWithReferencesProject.cshtml" />
<Watch Remove="Templates\SolutionRelations.cshtml" />
<Watch Remove="Templates\TestProjects.cshtml" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ public async Task<string> Generate_MermaidVisualizerMajorDiffer(DisplayDataMoreT
var rz = new MermaidVisualizerMajorDiffer(model);
return await rz.RenderAsync();
}
public async Task<string> Generate_ProjectsRelations(ProjectsDict model)
public async Task<string> Generate_SolutionRelations(ProjectsDict model)
{
var rz = new ProjectsRelations(model);
var rz = new SolutionRelations(model);
return await rz.RenderAsync();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@
var prefix = GlobalsForGenerating.globalPrefix();
var nrMaxProjects = Math.Max(Model.MaxReferences/3,3);
}
---
sidebar_position: 40
---

# Projects Building Blocks

## Number of BB0 : @Model.BuildingBlocks(0).Length
@for (int i = 0; i < nrMaxProjects; i++)
{
<text>## Building Blocks - Projects with @i project references
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@
@{
var keysPackageMultiple = Model.KeysPackageMultiple();
}
---
sidebar_position: 30
---
# Packages

## Number of packages : @Model.NrPackages()

# Number of packages:@Model.NrPackages()
## Packages with more than 1 version: @keysPackageMultiple.Length ( @(keysPackageMultiple.Length * 100 / @Model.NrPackages()) % from total packages)

## Number of packages with major version differs: @Model.MajorVersionDiffers()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@
var keysPackageMultiple = Model.KeysPackageMultipleMajorDiffers();
int i = 0;
}
---
sidebar_position: 70
---

# Number of packages that differ in major version : @keysPackageMultiple.Length
# Different major version packages

## Packages major version differ : @keysPackageMultiple.Length

@foreach (var key in keysPackageMultiple)
{
Expand All @@ -18,7 +23,7 @@
## @i @key

```mermaid
graph TB
flowchart
subgraph packages
@Html.Raw(key + "\r\n")
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
var name = Model.FullNameMermaid();
var prefix = GlobalsForGenerating.globalPrefix();
}
---

sidebar_position: 20
---
# Project packages @relativePath

|Nr|ID|Version|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


```mermaid
graph TB
flowchart

@name

Expand Down Expand Up @@ -46,7 +46,7 @@ graph TB

# Projects that reference @nameCsproj
```mermaid
graph TB
flowchart

@name

Expand Down Expand Up @@ -78,7 +78,7 @@ graph TB
# Full Project relations for @nameCsproj

```mermaid
graph TB
flowchart

@name
click @nameCsproj "@prefix/Projects/@nameCsproj/ProjectReferences" "@relativePath"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@
var nrRelations = Model.MaxReferences + 1;
var prefix = GlobalsForGenerating.globalPrefix();
}
---
sidebar_position: 50
---
# Root Projects - projects that are not referenced anywhere

## Root Projects - projects that are not referenced anywhere

## Root projects number: @rootProjects.Length
```mermaid
graph TB
flowchart
%% start root projects

Solution[Solution]
Expand Down Expand Up @@ -48,7 +51,7 @@ Solution[Solution]


```mermaid
graph TB
flowchart
@comment

@name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@
var prefix = GlobalsForGenerating.globalPrefix();

}
---
sidebar_position: 10
---

# Projects relations (not included tests)

# Solution relations (without tests)

## Quadrant Packages / Relations

Expand Down Expand Up @@ -42,7 +46,7 @@ quadrantChart
## All Projects Graph

```mermaid
graph TB
flowchart


@foreach (var proj in Model.AlphabeticOrderedProjectsNoTests)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@
@{
var prefix = GlobalsForGenerating.globalPrefix();
}
---
sidebar_position: 60
---

# Test Projects

## Test projects number: @Model.TestsProjects.Length

@foreach(var bbProj in Model.TestsProjects)
{
Expand All @@ -22,7 +27,7 @@

### Diagram
```mermaid
graph TB
flowchart

@bbProj.FullNameMermaid()

Expand Down

0 comments on commit 2654e97

Please sign in to comment.