Skip to content

Commit

Permalink
Add Blazor WebApp template with auto render mode (#180)
Browse files Browse the repository at this point in the history
* add webapp projcet

* update chart update data

* add CascadingValue routedata

* add webapp host to template

* build success

* static files

* update docs

* update docs

* fix build

* fix build
  • Loading branch information
ElderJames authored Jun 19, 2024
1 parent 1dfe2a8 commit bb37624
Show file tree
Hide file tree
Showing 56 changed files with 634 additions and 591 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
dotnet new -i ./pack/AntDesign.Templates.1.0.0.nupkg
dotnet new antdesign -n wasm --host wasm --full
dotnet new antdesign -n server --host server --full
dotnet new antdesign -n hosted --host hosted --full
dotnet new antdesign -n webapp --host webapp --full
dotnet build ./wasm
dotnet build ./server
dotnet build ./hosted
dotnet build ./webapp
33 changes: 17 additions & 16 deletions .template.config/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@
"host": {
"type": "parameter",
"datatype": "choice",
"defaultValue": "wasm",
"defaultValue": "webapp",
"choices": [
{
"choice": "wasm",
"description": "WebAssembly"
"choice": "webapp",
"description": "Blazor Web APP with auto render mode"
},
{
"choice": "server",
"description": "Server-Side"
"choice": "wasm",
"description": "WebAssembly Standalone app"
},
{
"choice": "hosted",
"description": "Asp.NET Core Hosted WebAssembly"
"choice": "server",
"description": "Server-site app"
}
]
},
Expand Down Expand Up @@ -74,7 +74,7 @@
],
"sources": [
{
"condition": "(host != 'hosted')",
"condition": "(host != 'webapp')",
"source": "./src/AntDesign.Pro",
"target": "./",
"modifiers": [
Expand Down Expand Up @@ -114,9 +114,9 @@
]
},
{
"condition": "(host == 'hosted')",
"condition": "(host == 'webapp')",
"source": "./src/AntDesign.Pro",
"target": "./src/Client/",
"target": "./AntDesign.Pro.Template/AntDesign.Pro.Template.Client/",
"modifiers": [
{
"exclude": [
Expand Down Expand Up @@ -166,7 +166,7 @@
]
},
{
"condition": "(host == 'hosted')",
"condition": "(host == 'webapp')",
"exclude": [
"Directory.Build.props"
]
Expand Down Expand Up @@ -230,13 +230,14 @@
]
},
{
"condition": "(host == 'hosted')",
"condition": "(host == 'webapp')",
"source": "./.template.config/templates/wasm",
"target": "./src/Client/",
"target": "./AntDesign.Pro.Template/AntDesign.Pro.Template.Client/",
"modifiers": [
{
"exclude": [
"AntDesign.Pro.Template.csproj"
"AntDesign.Pro.Template.csproj",
"Program.cs"
]
},
{
Expand All @@ -262,8 +263,8 @@
]
},
{
"condition": "(host == 'hosted')",
"source": "./.template.config/templates/hosted",
"condition": "(host == 'webapp')",
"source": "./.template.config/templates/webapp",
"target": "./",
"modifiers": [
{
Expand Down
62 changes: 0 additions & 62 deletions .template.config/templates/hosted/AntDesign.Pro.Template.sln

This file was deleted.

13 changes: 0 additions & 13 deletions .template.config/templates/hosted/src/Client/App.razor

This file was deleted.

41 changes: 0 additions & 41 deletions .template.config/templates/hosted/src/Client/Pages/Welcome.razor

This file was deleted.

This file was deleted.

This file was deleted.

34 changes: 0 additions & 34 deletions .template.config/templates/hosted/src/Client/Program.cs

This file was deleted.

Loading

0 comments on commit bb37624

Please sign in to comment.