Skip to content

Commit

Permalink
Merge pull request #287 from TimeWarpEngineering/Cramer/2022-03-23/Cl…
Browse files Browse the repository at this point in the history
…eanUpAndDocs

Cleanup and add Release notes and Migration
  • Loading branch information
StevenTCramer authored Mar 24, 2022
2 parents c2513f6 + 997d696 commit 1286996
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 49 deletions.
2 changes: 1 addition & 1 deletion Build/BlazorStateMultiStage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ variables:
Major: 5
Minor: 0
Patch: 0
Beta: "-beta.1" # "-beta.X" or ""
Beta: "" # "-beta.X" or ""
DotNetSdkVersion: 6.0.200

stages:
Expand Down
20 changes: 20 additions & 0 deletions Documentation/Migrations/Migration4-5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
uid: BlazorState:Migration4-5.md
title: Migrate From 4.X to 5.X
---

# Migration

## From 4.X to 5.X

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)

After completing that dotnet 6 migration the blazor-state specific changes are as follows:

### Remove the script tag in your index.html or _Host.cshtml files

Delete:

```html
<script src="_content/BlazorState.js/blazorstate.js"></script>
```
23 changes: 23 additions & 0 deletions Documentation/ReleaseNotes/Release5.0.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
uid: BlazorState:Release.5.0.0.md
title: Release 5.0.0
---

## Release 5.0.0

### Breaking Changes
* Blazor-State has moved to net6.0
* <script src="_content/Blazor-State/blazorstate.js"></script> is no longer needed and should be removed.
* Updated Mediator to 10.0.1 https://jimmybogard.com/mediatr-10-0-released/
* Requires Browsers that support module import. [CanIUse](https://caniuse.com/?search=module)

See [Migrations](xref:BlazorState:Migration4-5.md) for how to migrate existing projects from 4.0 to 5.0.

### Other Changes
* Include debug symbols in main nuget package vs separate.
* Switch from Shouldly to FluentValidations
* Move to `Directory.Packagaes.props`
* Move to esproj and remove webpack.
* In dotnet 6 there are new capabilities to initialize JS modules.
* Move to file based namespaces;
* Run dotnet format on all.
11 changes: 1 addition & 10 deletions Documentation/Tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,15 +314,6 @@ public partial class App : ComponentBase
await JsonRequestHandler.InitAsync();
}
}

```
Lastly we need to add the blazor-state JavaScript to the `index.html` file located in `wwwroot` just above the `blazor.webassembly.js` reference:

```html
...
<script src="_content/Blazor-State/blazorstate.js"></script>
<script src="_framework/blazor.webassembly.js"></script>
...
```

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.
Expand All @@ -333,4 +324,4 @@ If you inspect the State in the DevTools you will also notice it maintains the c

![ReduxRouteState](Images/ReduxRouteState.png)

Congratulations that is the basics of using getting started with Blazor-State.
Congratulations that is the basics of Blazor-State.
38 changes: 0 additions & 38 deletions Source/BlazorState.Js/BlazorState.Js.esproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,4 @@
<NoWarn>NU1503;NU1105</NoWarn>
<BuildCommand>npm run build</BuildCommand>
</PropertyGroup>
<!-- <ItemGroup>
<Script Include="**"/>
<Script Remove="**.d.ts"/>
</ItemGroup> -->
<!-- <PropertyGroup>
<NpmInstallTimeStampFile>node_modules/.install-timestamp</NpmInstallTimeStampFile>
</PropertyGroup> -->

<!-- <Target
Name="EnsureNpmRestored"
Inputs="$(MSBuildThisFileDirectory)package-lock.json"
Outputs="$(NpmInstallTimeStampFile)"
>
<Message Importance="high" Text="Restoring dependencies using 'npm'. This may take several minutes..." />
<Exec Command="npm install" />
<Touch Files="$(NpmInstallTimeStampFile)" AlwaysCreate="true"/>
</Target> -->

<!-- <PropertyGroup>
<JavascriptOutputFile>blazorstate.js</JavascriptOutputFile>
</PropertyGroup>
<ItemGroup>
<WebpackInputs Include="**\*.ts" Exclude="node_modules\**" />
<WebpackInputs Remove="src\blazor-state.lib.module.ts" />
<WebpackInputs Remove="src\Constants.ts" />
<WebpackInputs Remove="src\DotNet.ts" />
</ItemGroup>

<Target
Name="RunBuild"
AfterTargets="ResolveReferences"
Inputs="@(WebpackInputs)"
Outputs="..\BlazorState\wwwroot\$(JavascriptOutputFile)"
DependsOnTargets="EnsureNpmRestored"
>
<Delete Files="..\BlazorState\wwwroot\$(JavascriptOutputFile)" />
<Exec Command="npm run build" />
</Target> -->
</Project>

0 comments on commit 1286996

Please sign in to comment.