-
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TypeScript Parser Implementation (#54)
* Multi-targeting with .NET 8. * Fix test path... * Gen AI triple slash... * Fix the publish bits. * Remove legacy switch * Upgrade to .NET 8.0, and use Central Package Management. * Fix merge issues. * Upgrade a few versions... * chore: remove globals.json * fix: merge issues * feat: start using Typescript AST * chore: remove regex parsing for source, use new AST. For now use old method to parse objects. Use raw strings for tests * chore: deep cleanup, apply sonar lint performance suggestions. Tests work as expected * fix: source generator not finding reference assembly * chore: code formatting * feat: implmented AST into the parser and source writer * chore: updated some test to match the output * chore: split main into method, code readability * fix: generic type not analyzed both for parses and builder, missing namespace to GenericOptions * feat: remove all regexes * fix: url double encoded * chore: split GetNodeText into function, add types examples of to handle * chore: create singleton for primitive mapping --------- Co-authored-by: David Pine <[email protected]> Co-authored-by: David Pine <[email protected]> Co-authored-by: Koja sig. Dennis <[email protected]>
- Loading branch information
1 parent
471581c
commit c4619d3
Showing
122 changed files
with
2,616 additions
and
2,697 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,47 @@ | ||
name: publish demo | ||
on: | ||
push: | ||
branches: [ main ] | ||
name: publish demo | ||
on: | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- 'samples/**' | ||
- 'samples/**' | ||
workflow_dispatch: | ||
inputs: | ||
reason: | ||
description: 'The reason for running the workflow' | ||
required: true | ||
default: 'Manual run' | ||
jobs: | ||
deploy-to-github-pages: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@main | ||
default: 'Manual run' | ||
jobs: | ||
deploy-to-github-pages: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@main | ||
- name: 'Print manual run reason' | ||
if: ${{ github.event_name == 'workflow_dispatch' }} | ||
run: | | ||
echo 'Reason: ${{ github.event.inputs.reason }}' | ||
- name: Setup .NET Core SDK | ||
uses: actions/setup-dotnet@main | ||
with: | ||
dotnet-version: 7.0.x | ||
- name: Publish .NET Core Project | ||
run: dotnet publish samples/Blazor.ExampleConsumer/Blazor.ExampleConsumer.csproj -c Release -o release --nologo | ||
|
||
# Changes the base-tag in index.html from '/' to '/blazorators' to match GitHub Pages repository subdirectory | ||
- name: Change base-tag in index.html from / to /blazorators | ||
run: sed -i 's/<base href="\/" \/>/<base href="\/blazorators\/" \/>/g' release/wwwroot/index.html | ||
|
||
# Copy index.html to 404.html to serve the same file when a file is not found | ||
- name: copy index.html to 404.html | ||
run: cp release/wwwroot/index.html release/wwwroot/404.html | ||
|
||
# Add .nojekyll file to tell GitHub pages to not treat this as a Jekyll project. | ||
# Allow files and folders starting with an underscore | ||
- name: Add .nojekyll file | ||
run: touch release/wwwroot/.nojekyll | ||
|
||
- name: Commit wwwroot to GitHub Pages | ||
uses: JamesIves/[email protected] | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BRANCH: gh-pages | ||
echo 'Reason: ${{ github.event.inputs.reason }}' | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@main | ||
with: | ||
dotnet-version: 8.0.x | ||
- name: Publish .NET Core Project | ||
run: dotnet publish samples/Blazor.ExampleConsumer/Blazor.ExampleConsumer.csproj -c Release -o release --nologo | ||
|
||
# Changes the base-tag in index.html from '/' to '/blazorators' to match GitHub Pages repository subdirectory | ||
- name: Change base-tag in index.html from / to /blazorators | ||
run: sed -i 's/<base href="\/" \/>/<base href="\/blazorators\/" \/>/g' release/wwwroot/index.html | ||
|
||
# Copy index.html to 404.html to serve the same file when a file is not found | ||
- name: copy index.html to 404.html | ||
run: cp release/wwwroot/index.html release/wwwroot/404.html | ||
|
||
# Add .nojekyll file to tell GitHub pages to not treat this as a Jekyll project. | ||
# Allow files and folders starting with an underscore | ||
- name: Add .nojekyll file | ||
run: touch release/wwwroot/.nojekyll | ||
|
||
- name: Commit wwwroot to GitHub Pages | ||
uses: JamesIves/[email protected] | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BRANCH: gh-pages | ||
FOLDER: release/wwwroot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally> | ||
</PropertyGroup> | ||
<!-- Use these versions regardless of TFM --> | ||
<ItemGroup> | ||
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" /> | ||
<PackageVersion Include="MinVer" Version="5.0.0-beta.1" /> | ||
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.7.0" /> | ||
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" /> | ||
<PackageVersion Include="System.Reactive.Linq" Version="6.0.0" /> | ||
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0" /> | ||
<PackageVersion Include="Microsoft.Playwright" Version="1.39.0" /> | ||
<PackageVersion Include="xunit" Version="2.6.1" /> | ||
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.3" /> | ||
<PackageVersion Include="coverlet.collector" Version="6.0.0" /> | ||
<PackageVersion Include="Basic.Reference.Assemblies" Version="1.4.5" /> | ||
<PackageVersion Include="Humanizer.Core" Version="2.14.1" /> | ||
</ItemGroup> | ||
<!-- .NET 7.0 bits --> | ||
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'"> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.Web" Version="7.0.14" /> | ||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" /> | ||
<PackageVersion Include="Microsoft.Extensions.Primitives" Version="7.0.0" /> | ||
<PackageVersion Include="Microsoft.JSInterop" Version="7.0.14" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.14" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.14" /> | ||
</ItemGroup> | ||
<!-- .NET 8.0 bits --> | ||
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'"> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.Web" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.Extensions.Primitives" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.JSInterop" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.0" /> | ||
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.0" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
36 changes: 18 additions & 18 deletions
36
samples/Blazor.ExampleConsumer/Blazor.ExampleConsumer.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net7.0</TargetFramework> | ||
<Nullable>enable</Nullable> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<Nullable>enable</Nullable> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Humanizer.Core" Version="2.14.1" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.1" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.1" PrivateAssets="all" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Humanizer.Core" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" PrivateAssets="all" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\src\Blazor.Geolocation.WebAssembly\Blazor.Geolocation.WebAssembly.csproj" /> | ||
<ProjectReference Include="..\..\src\Blazor.LocalStorage.WebAssembly\Blazor.LocalStorage.WebAssembly.csproj" /> | ||
<ProjectReference Include="..\..\src\Blazor.Serialization\Blazor.Serialization.csproj" /> | ||
<ProjectReference Include="..\..\src\Blazor.SessionStorage.WebAssembly\Blazor.SessionStorage.WebAssembly.csproj" /> | ||
<ProjectReference Include="..\..\src\Blazor.SpeechRecognition.WebAssembly\Blazor.SpeechRecognition.WebAssembly.csproj" /> | ||
<ProjectReference Include="..\..\src\Blazor.SpeechSynthesis.WebAssembly\Blazor.SpeechSynthesis.WebAssembly.csproj" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\..\src\Blazor.Geolocation.WebAssembly\Blazor.Geolocation.WebAssembly.csproj" /> | ||
<ProjectReference Include="..\..\src\Blazor.LocalStorage.WebAssembly\Blazor.LocalStorage.WebAssembly.csproj" /> | ||
<ProjectReference Include="..\..\src\Blazor.Serialization\Blazor.Serialization.csproj" /> | ||
<ProjectReference Include="..\..\src\Blazor.SessionStorage.WebAssembly\Blazor.SessionStorage.WebAssembly.csproj" /> | ||
<ProjectReference Include="..\..\src\Blazor.SpeechRecognition.WebAssembly\Blazor.SpeechRecognition.WebAssembly.csproj" /> | ||
<ProjectReference Include="..\..\src\Blazor.SpeechSynthesis.WebAssembly\Blazor.SpeechSynthesis.WebAssembly.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
File renamed without changes.
19 changes: 19 additions & 0 deletions
19
samples/Blazor.ExampleConsumer/Components/Layout/MainLayout.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
@using System.Runtime.InteropServices | ||
@inherits LayoutComponentBase | ||
|
||
<div class="page"> | ||
<div class="sidebar"> | ||
<NavMenu /> | ||
</div> | ||
|
||
<main> | ||
<div class="top-row px-4 text-muted"> | ||
Powered by @RuntimeInformation.FrameworkDescription | ||
</div> | ||
|
||
<article class="content px-4 col-xl-8"> | ||
@Body | ||
</article> | ||
|
||
</main> | ||
</div> |
Oops, something went wrong.