Skip to content

Commit

Permalink
Merge pull request #68 from GoranHalvarsson/feature/upgrade-3.2.0-pre…
Browse files Browse the repository at this point in the history
…view-4

Upgrading, removing BlazorPWA.MSBuild will instead use the default on…
  • Loading branch information
GoranHalvarsson committed Apr 22, 2020
2 parents cb693fe + f2a22d9 commit 19ea664
Show file tree
Hide file tree
Showing 23 changed files with 117 additions and 261 deletions.
2 changes: 1 addition & 1 deletion Build/Props/Project.BuildProperties.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<AspNetCoreVersion>3.1.2</AspNetCoreVersion>
<BlazorVersion>3.2.0-preview3.20168.3</BlazorVersion>
<BlazorVersion>3.2.0-preview4.20210.8</BlazorVersion>
<BlazorClientDirectory>$(SolutionDir)SitecoreBlazorHosted.Client</BlazorClientDirectory>
<BlazorServerDirectory>$(SolutionDir)SitecoreBlazorHosted.Server</BlazorServerDirectory>
<BlazorElectronDirectory>$(SolutionDir)SitecoreBlazorHosted.Electron</BlazorElectronDirectory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<IsPackable>true</IsPackable>
<BlazorWebAssemblyEnableLinking>true</BlazorWebAssemblyEnableLinking>
<LangVersion>8</LangVersion>
<TypeScriptToolsVersion>3.7</TypeScriptToolsVersion>
<TypeScriptToolsVersion>3.8</TypeScriptToolsVersion>
<Configurations>Debug;Release;BlazorServer;BlazorClient;BlazorElektron</Configurations>
<RazorLangVersion>3.0</RazorLangVersion>
</PropertyGroup>
Expand Down
1 change: 0 additions & 1 deletion Project/BlazorSite/Project.BlazorSite.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components" Version="$(AspNetCoreVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="$(AspNetCoreVersion)" />
<!--<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Build" Version="$(BlazorVersion)" PrivateAssets="all" />-->
<PackageReference Include="System.Text.Json" Version="4.7.1" />
</ItemGroup>

Expand Down
5 changes: 4 additions & 1 deletion SitecoreBlazorHosted.Client/Program.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@


using System;
using System.Net.Http;
using System.Threading.Tasks;
using Feature.Navigation.Extensions;
using Foundation.BlazorExtensions.Extensions;
Expand All @@ -8,6 +10,7 @@
using Microsoft.Extensions.DependencyInjection;
using Project.BlazorSite;


namespace SitecoreBlazorHosted.Client
{

Expand All @@ -16,7 +19,7 @@ public class Program
public static async Task Main(string[] args)
{
WebAssemblyHostBuilder builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.Services.AddBaseAddressHttpClient();
builder.Services.AddSingleton(new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
builder.Services.AddScoped<IRestService, RestService>();
builder.Services.AddForFoundationBlazorExtensions();
builder.Services.AddForFeatureNavigation();
Expand Down
17 changes: 4 additions & 13 deletions SitecoreBlazorHosted.Client/SitecoreBlazorHosted.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,17 @@
<LangVersion>8</LangVersion>
<RazorLangVersion>3.0</RazorLangVersion>
<Configurations>Debug;Release;BlazorClient</Configurations>
<ServiceWorkerForce>true</ServiceWorkerForce>
<ServiceWorkerAssetsManifest>service-worker-assets.js</ServiceWorkerAssetsManifest>
</PropertyGroup>

<ItemGroup>
<Compile Remove="Startup.cs" />
</ItemGroup>





<ItemGroup>
<PackageReference Include="BlazorPWA.MSBuild" Version="1.0.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="BuildWebCompiler" Version="1.12.405" />
<PackageReference Include="BuildBundlerMinifier" Version="3.2.435" />
<PackageReference Include="BuildBundlerMinifier" Version="3.2.447" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="$(BlazorVersion)" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Build" Version="$(BlazorVersion)" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Blazor.HttpClient" Version="$(BlazorVersion)" />
<PackageReference Include="System.Net.Http.Json" Version="3.2.0-preview5.20210.3" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="$(BlazorVersion)" PrivateAssets="all" />
<PackageReference Include="System.Text.Json" Version="4.7.1" />
</ItemGroup>
Expand Down
99 changes: 0 additions & 99 deletions SitecoreBlazorHosted.Client/wwwroot/ServiceWorker.js

This file was deleted.

110 changes: 0 additions & 110 deletions SitecoreBlazorHosted.Client/wwwroot/ServiceWorkerRegister.js

This file was deleted.

8 changes: 4 additions & 4 deletions SitecoreBlazorHosted.Client/wwwroot/data/routes/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
"Type": "ImageField"
},
"Title": {
"Value": "Sitecore Experience Platform + BLAZOR 3.2.0-preview3.20168.3",
"Value": "Sitecore Experience Platform + BLAZOR 3.2.0-preview4.20210.8",
"Type": "PlainTextField"
},
"Text": {
Expand Down Expand Up @@ -140,15 +140,15 @@
"Fields": {
"CardHeaderLink": {
"Value": {
"Href": "https://devblogs.microsoft.com/aspnet/blazor-webassembly-3-2-0-preview-2-release-now-available/",
"Text": "Blazor WebAssembly 3.2.0 Preview 2 release now available",
"Href": "https://devblogs.microsoft.com/aspnet/blazor-webassembly-3-2-0-preview-4-release-now-available/",
"Text": "Blazor WebAssembly 3.2.0 Preview 4 release now available",
"Target": "_blank",
"Class": ""
},
"Type": "LinkField"
},
"CardText": {
"Value": "Blazor WebAssembly 3.2.0 Preview 2 is now available! Check out all the updates and improvements in this release.",
"Value": "Blazor WebAssembly 3.2.0 Preview 4 is now available! Check out all the updates and improvements in this release.",
"Type": "HtmlField"
},
"CardIdentifier": {
Expand Down
2 changes: 1 addition & 1 deletion SitecoreBlazorHosted.Client/wwwroot/data/routes/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
"Type": "ImageField"
},
"Title": {
"Value": "Sitecore Experience Platform + BLAZOR 3.2.0-preview3.20168.3",
"Value": "Sitecore Experience Platform + BLAZOR 3.2.0-preview4.20210.8",
"Type": "PlainTextField"
},
"Text": {
Expand Down
Binary file not shown.
Binary file added SitecoreBlazorHosted.Client/wwwroot/favicon.ico
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 2 additions & 5 deletions SitecoreBlazorHosted.Client/wwwroot/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,10 @@
<meta name="viewport" content="width=device-width">
<title>Sitecore Blazor WebAssembly</title>
<base href="/" />
<link rel="icon"
type="image/png"
href="/icons/icon.png">
<link href="css/site.min.css" rel="stylesheet" />
<link rel="manifest" href="manifest.json">
<link rel="script" href="service-worker.js">
<meta name="theme-color" content="#052767" />
<script src="ServiceWorkerRegister.js"></script>
<link rel="apple-touch-icon" sizes="512x512" href="/icons/icon-512.png" />
</head>
<body>
<app><img src="images/SBlazor.svg" /></app>
Expand All @@ -23,6 +19,7 @@
<a class="dismiss">🗙</a>
</div>
<script src="_framework/blazor.webassembly.js"></script>
<script>navigator.serviceWorker.register('service-worker.js');</script>
<script src="scripts/interop.min.js"></script>


Expand Down
19 changes: 8 additions & 11 deletions SitecoreBlazorHosted.Client/wwwroot/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,18 @@
"name": "SitecoreBlazorHosted.Client",
"start_url": "/",
"display": "standalone",
"background_color": "#ffffff",
"theme_color": "#03173d",
"icons": [
{
"src":"/icons/icon-192x192.png",
"type":"image/png",
"sizes":"192x192"
"src": "/icons/icon-192x192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src":"/images/icon-192x192.png",
"type":"image/png",
"sizes":"192x192"
},
{
"src":"/default-icon-512x512.png",
"type":"image/png",
"sizes":"512x512"
"src": "icons/icon-512x512.png",
"type": "image/png",
"sizes": "512x512"
}
]
}
4 changes: 4 additions & 0 deletions SitecoreBlazorHosted.Client/wwwroot/service-worker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// In development, always fetch from the network and do not enable offline support.
// This is because caching would make development more difficult (changes would not
// be reflected on the first load after each change).
self.addEventListener('fetch', () => { });
Loading

0 comments on commit 19ea664

Please sign in to comment.