Skip to content

Commit 1286996

Browse files
Merge pull request #287 from TimeWarpEngineering/Cramer/2022-03-23/CleanUpAndDocs
Cleanup and add Release notes and Migration
2 parents c2513f6 + 997d696 commit 1286996

5 files changed

Lines changed: 45 additions & 49 deletions

File tree

Build/BlazorStateMultiStage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ variables:
77
Major: 5
88
Minor: 0
99
Patch: 0
10-
Beta: "-beta.1" # "-beta.X" or ""
10+
Beta: "" # "-beta.X" or ""
1111
DotNetSdkVersion: 6.0.200
1212

1313
stages:
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
uid: BlazorState:Migration4-5.md
3+
title: Migrate From 4.X to 5.X
4+
---
5+
6+
# Migration
7+
8+
## From 4.X to 5.X
9+
10+
The biggest requirement will be to migrate to dotnet 6. See [Migrate from ASP.NET Core 5.0 to 6.0](https://docs.microsoft.com/en-us/aspnet/core/migration/50-to-60?view=aspnetcore-6.0&tabs=visual-studio)
11+
12+
After completing that dotnet 6 migration the blazor-state specific changes are as follows:
13+
14+
### Remove the script tag in your index.html or _Host.cshtml files
15+
16+
Delete:
17+
18+
```html
19+
<script src="_content/BlazorState.js/blazorstate.js"></script>
20+
```
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
uid: BlazorState:Release.5.0.0.md
3+
title: Release 5.0.0
4+
---
5+
6+
## Release 5.0.0
7+
8+
### Breaking Changes
9+
* Blazor-State has moved to net6.0
10+
* <script src="_content/Blazor-State/blazorstate.js"></script> is no longer needed and should be removed.
11+
* Updated Mediator to 10.0.1 https://jimmybogard.com/mediatr-10-0-released/
12+
* Requires Browsers that support module import. [CanIUse](https://caniuse.com/?search=module)
13+
14+
See [Migrations](xref:BlazorState:Migration4-5.md) for how to migrate existing projects from 4.0 to 5.0.
15+
16+
### Other Changes
17+
* Include debug symbols in main nuget package vs separate.
18+
* Switch from Shouldly to FluentValidations
19+
* Move to `Directory.Packagaes.props`
20+
* Move to esproj and remove webpack.
21+
* In dotnet 6 there are new capabilities to initialize JS modules.
22+
* Move to file based namespaces;
23+
* Run dotnet format on all.

Documentation/Tutorial.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -314,15 +314,6 @@ public partial class App : ComponentBase
314314
await JsonRequestHandler.InitAsync();
315315
}
316316
}
317-
318-
```
319-
Lastly we need to add the blazor-state JavaScript to the `index.html` file located in `wwwroot` just above the `blazor.webassembly.js` reference:
320-
321-
```html
322-
...
323-
<script src="_content/Blazor-State/blazorstate.js"></script>
324-
<script src="_framework/blazor.webassembly.js"></script>
325-
...
326317
```
327318

328319
Now run your app again and then Open the Redux Dev Tools (a tab in Chrome Dev Tools) and you should see Actions as they are executed.
@@ -333,4 +324,4 @@ If you inspect the State in the DevTools you will also notice it maintains the c
333324

334325
![ReduxRouteState](Images/ReduxRouteState.png)
335326

336-
Congratulations that is the basics of using getting started with Blazor-State.
327+
Congratulations that is the basics of Blazor-State.

Source/BlazorState.Js/BlazorState.Js.esproj

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -4,42 +4,4 @@
44
<NoWarn>NU1503;NU1105</NoWarn>
55
<BuildCommand>npm run build</BuildCommand>
66
</PropertyGroup>
7-
<!-- <ItemGroup>
8-
<Script Include="**"/>
9-
<Script Remove="**.d.ts"/>
10-
</ItemGroup> -->
11-
<!-- <PropertyGroup>
12-
<NpmInstallTimeStampFile>node_modules/.install-timestamp</NpmInstallTimeStampFile>
13-
</PropertyGroup> -->
14-
15-
<!-- <Target
16-
Name="EnsureNpmRestored"
17-
Inputs="$(MSBuildThisFileDirectory)package-lock.json"
18-
Outputs="$(NpmInstallTimeStampFile)"
19-
>
20-
<Message Importance="high" Text="Restoring dependencies using 'npm'. This may take several minutes..." />
21-
<Exec Command="npm install" />
22-
<Touch Files="$(NpmInstallTimeStampFile)" AlwaysCreate="true"/>
23-
</Target> -->
24-
25-
<!-- <PropertyGroup>
26-
<JavascriptOutputFile>blazorstate.js</JavascriptOutputFile>
27-
</PropertyGroup>
28-
<ItemGroup>
29-
<WebpackInputs Include="**\*.ts" Exclude="node_modules\**" />
30-
<WebpackInputs Remove="src\blazor-state.lib.module.ts" />
31-
<WebpackInputs Remove="src\Constants.ts" />
32-
<WebpackInputs Remove="src\DotNet.ts" />
33-
</ItemGroup>
34-
35-
<Target
36-
Name="RunBuild"
37-
AfterTargets="ResolveReferences"
38-
Inputs="@(WebpackInputs)"
39-
Outputs="..\BlazorState\wwwroot\$(JavascriptOutputFile)"
40-
DependsOnTargets="EnsureNpmRestored"
41-
>
42-
<Delete Files="..\BlazorState\wwwroot\$(JavascriptOutputFile)" />
43-
<Exec Command="npm run build" />
44-
</Target> -->
457
</Project>

0 commit comments

Comments
 (0)