Skip to content

Commit

Permalink
Thanos snap: erase everything (most) to start fresh
Browse files Browse the repository at this point in the history
  • Loading branch information
desmondinho committed May 13, 2024
1 parent 57ad90a commit 214ec33
Show file tree
Hide file tree
Showing 353 changed files with 99 additions and 17,761 deletions.
23 changes: 0 additions & 23 deletions LumexUI.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.2.32526.322
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LumexUI.Tests", "src\test\LumexUI.Tests\LumexUI.Tests.csproj", "{2D37717C-9FC5-4EAD-93AE-1A79ACD3C945}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LumexUI", "src\LumexUI\LumexUI.csproj", "{F5DCF265-756B-4B25-AECA-15B9FF2DCB66}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{F98196F8-3B41-461E-A47A-CC1B80E34C68}"
Expand All @@ -14,8 +12,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LumexUI.Utilities", "src\LumexUI.Utilities\LumexUI.Utilities.csproj", "{92A1C629-AB3E-4264-B03D-407E09162902}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LumexUI.TestComponents", "src\test\LumexUI.TestComponents\LumexUI.TestComponents.csproj", "{12255509-80D3-470A-976F-4D6A5CBFB6F0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LumexUI.Docs", "docs\LumexUI.Docs\LumexUI.Docs.csproj", "{04BC4C88-2992-450D-BF7C-BD49BFE6CBDF}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LumexUI.Docs.Server", "docs\LumexUI.Docs.Server\LumexUI.Docs.Server.csproj", "{85A5E6D0-116C-4EAF-A9A8-7F074625C1F0}"
Expand All @@ -24,24 +20,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LumexUI.Docs.Client", "docs
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LumexUI.Docs.Generator", "docs\LumexUI.Docs.Generator\LumexUI.Docs.Generator.csproj", "{157B8BDD-2EEF-4A69-AEA5-CAA3650CF73C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LumexUI.Grid", "src\LumexUI.Grid\LumexUI.Grid.csproj", "{D5F8849A-34A5-42BD-A2E4-F2E1480A8F47}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{5DBC44B8-5B92-4504-8B8F-91A1672251E6}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{3F4DE3FA-2636-440C-ACCC-137BAD95BAC4}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{338397EE-221B-45F5-9DDC-82352ED241A0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{2D37717C-9FC5-4EAD-93AE-1A79ACD3C945}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2D37717C-9FC5-4EAD-93AE-1A79ACD3C945}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2D37717C-9FC5-4EAD-93AE-1A79ACD3C945}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2D37717C-9FC5-4EAD-93AE-1A79ACD3C945}.Release|Any CPU.Build.0 = Release|Any CPU
{F5DCF265-756B-4B25-AECA-15B9FF2DCB66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F5DCF265-756B-4B25-AECA-15B9FF2DCB66}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F5DCF265-756B-4B25-AECA-15B9FF2DCB66}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -50,10 +38,6 @@ Global
{92A1C629-AB3E-4264-B03D-407E09162902}.Debug|Any CPU.Build.0 = Debug|Any CPU
{92A1C629-AB3E-4264-B03D-407E09162902}.Release|Any CPU.ActiveCfg = Release|Any CPU
{92A1C629-AB3E-4264-B03D-407E09162902}.Release|Any CPU.Build.0 = Release|Any CPU
{12255509-80D3-470A-976F-4D6A5CBFB6F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{12255509-80D3-470A-976F-4D6A5CBFB6F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{12255509-80D3-470A-976F-4D6A5CBFB6F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{12255509-80D3-470A-976F-4D6A5CBFB6F0}.Release|Any CPU.Build.0 = Release|Any CPU
{04BC4C88-2992-450D-BF7C-BD49BFE6CBDF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{04BC4C88-2992-450D-BF7C-BD49BFE6CBDF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{04BC4C88-2992-450D-BF7C-BD49BFE6CBDF}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand All @@ -70,24 +54,17 @@ Global
{157B8BDD-2EEF-4A69-AEA5-CAA3650CF73C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{157B8BDD-2EEF-4A69-AEA5-CAA3650CF73C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{157B8BDD-2EEF-4A69-AEA5-CAA3650CF73C}.Release|Any CPU.Build.0 = Release|Any CPU
{D5F8849A-34A5-42BD-A2E4-F2E1480A8F47}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D5F8849A-34A5-42BD-A2E4-F2E1480A8F47}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D5F8849A-34A5-42BD-A2E4-F2E1480A8F47}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D5F8849A-34A5-42BD-A2E4-F2E1480A8F47}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{2D37717C-9FC5-4EAD-93AE-1A79ACD3C945} = {338397EE-221B-45F5-9DDC-82352ED241A0}
{F5DCF265-756B-4B25-AECA-15B9FF2DCB66} = {5DBC44B8-5B92-4504-8B8F-91A1672251E6}
{92A1C629-AB3E-4264-B03D-407E09162902} = {5DBC44B8-5B92-4504-8B8F-91A1672251E6}
{12255509-80D3-470A-976F-4D6A5CBFB6F0} = {338397EE-221B-45F5-9DDC-82352ED241A0}
{04BC4C88-2992-450D-BF7C-BD49BFE6CBDF} = {3F4DE3FA-2636-440C-ACCC-137BAD95BAC4}
{85A5E6D0-116C-4EAF-A9A8-7F074625C1F0} = {3F4DE3FA-2636-440C-ACCC-137BAD95BAC4}
{4F70D87A-4766-4249-9B74-0B63A987BB15} = {3F4DE3FA-2636-440C-ACCC-137BAD95BAC4}
{157B8BDD-2EEF-4A69-AEA5-CAA3650CF73C} = {3F4DE3FA-2636-440C-ACCC-137BAD95BAC4}
{D5F8849A-34A5-42BD-A2E4-F2E1480A8F47} = {5DBC44B8-5B92-4504-8B8F-91A1672251E6}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {1B8CD55B-BEF0-42D1-936A-BC1FB5D02CE2}
Expand Down
1 change: 0 additions & 1 deletion docs/LumexUI.Docs.Client/LumexUI.Docs.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.2" PrivateAssets="all" />
</ItemGroup>

<!-- Project References -->
<ItemGroup>
<ProjectReference Include="..\LumexUI.Docs\LumexUI.Docs.csproj" />
</ItemGroup>
Expand Down
3 changes: 0 additions & 3 deletions docs/LumexUI.Docs.Client/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// LumexUI licenses this file to you under the MIT license
// See the license here https://github.com/LumexUI/lumexui/blob/main/LICENSE

using LumexUI.Docs.Extensions;

using Microsoft.AspNetCore.Components.Web;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;

Expand All @@ -18,7 +16,6 @@ private static async Task Main( string[] args )
builder.RootComponents.Add<HeadOutlet>( "head::after" );

builder.Services.AddScoped( sp => new HttpClient { BaseAddress = new Uri( builder.HostEnvironment.BaseAddress ) } );
builder.Services.AddLumexDocsServices();

await builder.Build().RunAsync();
}
Expand Down
157 changes: 79 additions & 78 deletions docs/LumexUI.Docs.Generator/CodeSnippets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,88 +2,89 @@
// LumexUI licenses this file to you under the MIT license
// See the license here https://github.com/LumexUI/lumexui/blob/main/LICENSE

using Markdig;
using System.Text;

using Markdig;

namespace LumexUI.Docs.Generator;

internal static class CodeSnippets
{
private static readonly MarkdownPipeline? _pipeline;

static CodeSnippets()
{
_pipeline = new MarkdownPipelineBuilder()
.UseAdvancedExtensions()
.Build();
}

internal static void Execute()
{
var srcDirPath = GetSrcDirectoryPath();

if( string.IsNullOrEmpty( srcDirPath ) )
{
return;
}

GenerateHtmlFiles( srcDirPath );
}

private static void GenerateHtmlFiles( string srcDirPath )
{
var docsDirPath = Directory.EnumerateDirectories( srcDirPath, "LumexUI.Docs" ).First();
var directoryInfo = new DirectoryInfo( docsDirPath );
var files = directoryInfo.GetFiles( @"Pages\*.razor", SearchOption.AllDirectories );

foreach( var file in files )
{
if( !file.DirectoryName!.EndsWith( "Examples" ) )
{
continue;
}

var fileName = file.Name.Replace( ".razor", ".html" );
var filePath = file.DirectoryName.Replace( "Examples", "Code" );
var markdownPath = Path.Combine( filePath, fileName );
var markdownContent = ConvertRazorToMarkdown( file );
var htmlContent = Markdown.ToHtml( markdownContent, _pipeline );

if( !Directory.Exists( filePath ) )
{
Directory.CreateDirectory( filePath );
}

using StreamWriter streamWriter = new( markdownPath );
streamWriter.Write( htmlContent );
}
}

private static string ConvertRazorToMarkdown( FileInfo file )
{
StringBuilder sb = new();

sb.AppendLine( "```razor" );
sb.AppendLine( File.ReadAllText( file.FullName ).TrimEnd() );
sb.AppendLine( "```" );

return sb.ToString();
}

private static string GetSrcDirectoryPath()
{
string path = Directory.GetCurrentDirectory();

while( !string.IsNullOrEmpty( path ) )
{
if( Path.GetFileName( path ) == "docs" )
{
return path;
}

path = Path.GetDirectoryName( path )!;
}

return path;
}
private static readonly MarkdownPipeline? _pipeline;

static CodeSnippets()
{
_pipeline = new MarkdownPipelineBuilder()
.UseAdvancedExtensions()
.Build();
}

internal static void Execute()
{
var srcDirPath = GetSrcDirectoryPath();

if( string.IsNullOrEmpty( srcDirPath ) )
{
return;
}

GenerateHtmlFiles( srcDirPath );
}

private static void GenerateHtmlFiles( string srcDirPath )
{
var docsDirPath = Directory.EnumerateDirectories( srcDirPath, "LumexUI.Docs" ).First();
var directoryInfo = new DirectoryInfo( docsDirPath );
var files = directoryInfo.GetFiles( @"Pages\*.razor", SearchOption.AllDirectories );

foreach( var file in files )
{
if( !file.DirectoryName!.EndsWith( "Examples" ) )
{
continue;
}

var fileName = file.Name.Replace( ".razor", ".html" );
var filePath = file.DirectoryName.Replace( "Examples", "Code" );
var markdownPath = Path.Combine( filePath, fileName );
var markdownContent = ConvertRazorToMarkdown( file );
var htmlContent = Markdown.ToHtml( markdownContent, _pipeline );

if( !Directory.Exists( filePath ) )
{
Directory.CreateDirectory( filePath );
}

using StreamWriter streamWriter = new( markdownPath );
streamWriter.Write( htmlContent );
}
}

private static string ConvertRazorToMarkdown( FileInfo file )
{
StringBuilder sb = new();

sb.AppendLine( "```razor" );
sb.AppendLine( File.ReadAllText( file.FullName ).TrimEnd() );
sb.AppendLine( "```" );

return sb.ToString();
}

private static string GetSrcDirectoryPath()
{
string path = Directory.GetCurrentDirectory();

while( !string.IsNullOrEmpty( path ) )
{
if( Path.GetFileName( path ) == "docs" )
{
return path;
}

path = Path.GetDirectoryName( path )!;
}

return path;
}
}
19 changes: 10 additions & 9 deletions docs/LumexUI.Docs.Generator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,20 @@
// LumexUI licenses this file to you under the MIT license
// See the license here https://github.com/LumexUI/lumexui/blob/main/LICENSE

using LumexUI.Docs.Generator;
using System.Diagnostics;

using LumexUI.Docs.Generator;

internal class Program
{
private static void Main()
{
Console.WriteLine( $"Docs generation started..." );
private static void Main()
{
Console.WriteLine( $"Docs generation started..." );

var stopWatch = Stopwatch.StartNew();
CodeSnippets.Execute();
stopWatch.Stop();
var stopWatch = Stopwatch.StartNew();
CodeSnippets.Execute();
stopWatch.Stop();

Console.WriteLine( $"Time Elapsed: {stopWatch.Elapsed:ss\\.fff} seconds" );
}
Console.WriteLine( $"Time Elapsed: {stopWatch.Elapsed:ss\\.fff} seconds" );
}
}
3 changes: 0 additions & 3 deletions docs/LumexUI.Docs.Server/LumexUI.Docs.Server.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,14 @@
project determines which one you're choosing. So, in case you want to work on Blazor Server with hot
reload, you can set the EnableWebAssemblyHosting flag to 'false' above.
-->
<!-- Package References -->
<ItemGroup Condition="'$(EnableWebAssemblyHosting)' == 'true'">
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.2" />
</ItemGroup>

<!-- Handy stuff -->
<PropertyGroup Condition="'$(EnableWebAssemblyHosting)' == 'true'">
<DefineConstants>$(DefineConstants);ENABLE_WASM_HOSTING</DefineConstants>
</PropertyGroup>

<!-- Project References -->
<ItemGroup>
<ProjectReference Include="..\LumexUI.Docs\LumexUI.Docs.csproj" />
<ProjectReference Include="..\LumexUI.Docs.Client\LumexUI.Docs.Client.csproj" />
Expand Down
6 changes: 0 additions & 6 deletions docs/LumexUI.Docs.Server/Pages/_ServerLayout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<base href="~/" />
<link href="_content/LumexUI/LumexUI.min.css" rel="stylesheet" />
<link href="_content/LumexUI.Grid/LumexGrid.min.css" rel="stylesheet" />
<link href="_content/LumexUI.Docs/css/docs.min.css" rel="stylesheet" />
<component type="typeof(HeadOutlet)" render-mode="ServerPrerendered" />
</head>
<body>
Expand All @@ -27,9 +24,6 @@
<a class="dismiss">🗙</a>
</div>

<script src="_content/LumexUI/LumexUI.min.js"></script>
<script src="_content/LumexUI.Docs/js/prism.js"></script>
<script src="_content/LumexUI.Docs/js/docs.js"></script>
<script src="_framework/blazor.server.js"></script>
</body>
</html>
6 changes: 0 additions & 6 deletions docs/LumexUI.Docs.Server/Pages/_WebAssemblyHost.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>LumexUI - Blazor Components Library</title>
<base href="/webassembly/" />
<link href="_content/LumexUI/LumexUI.min.css" rel="stylesheet" />
<link href="_content/LumexUI.Grid/LumexGrid.min.css" rel="stylesheet" />
<link href="_content/LumexUI.Docs/css/Docs.min.css" rel="stylesheet" />
</head>

<body>
Expand All @@ -21,9 +18,6 @@
<a class="dismiss">🗙</a>
</div>

<script src="_content/LumexUI/LumexUI.min.js"></script>
<script src="_content/LumexUI.Docs/js/prism.js"></script>
<script src="_content/LumexUI.Docs/js/docs.js"></script>
<script src="_framework/blazor.webassembly.js"></script>
</body>

Expand Down
3 changes: 0 additions & 3 deletions docs/LumexUI.Docs.Server/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@
// LumexUI licenses this file to you under the MIT license
// See the license here https://github.com/LumexUI/lumexui/blob/main/LICENSE

using LumexUI.Docs.Extensions;

var builder = WebApplication.CreateBuilder( args );

// Add services to the container.

builder.Services.AddControllersWithViews();
builder.Services.AddRazorPages();
builder.Services.AddServerSideBlazor();
builder.Services.AddLumexDocsServices();

var app = builder.Build();

Expand Down
Loading

0 comments on commit 214ec33

Please sign in to comment.