Skip to content

Commit

Permalink
Move hot reload functionality to separate nuget Bolero.HotReload
Browse files Browse the repository at this point in the history
  • Loading branch information
Tarmil committed Feb 12, 2019
1 parent 663225a commit eb7187f
Show file tree
Hide file tree
Showing 10 changed files with 53 additions and 8 deletions.
15 changes: 15 additions & 0 deletions Bolero.sln
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Bolero.Templating.Provider", "src\Bolero.Templating.Provider\Bolero.Templating.Provider.fsproj", "{770469C8-531A-4317-9BCE-DFF61E79B944}"
EndProject
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "Bolero.Templating.Server", "src\Bolero.Templating.Server\Bolero.Templating.Server.fsproj", "{262580BD-45C4-4190-A852-59D8720A9EDE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -167,6 +169,18 @@ Global
{770469C8-531A-4317-9BCE-DFF61E79B944}.Release|x64.Build.0 = Release|Any CPU
{770469C8-531A-4317-9BCE-DFF61E79B944}.Release|x86.ActiveCfg = Release|Any CPU
{770469C8-531A-4317-9BCE-DFF61E79B944}.Release|x86.Build.0 = Release|Any CPU
{262580BD-45C4-4190-A852-59D8720A9EDE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{262580BD-45C4-4190-A852-59D8720A9EDE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{262580BD-45C4-4190-A852-59D8720A9EDE}.Debug|x64.ActiveCfg = Debug|Any CPU
{262580BD-45C4-4190-A852-59D8720A9EDE}.Debug|x64.Build.0 = Debug|Any CPU
{262580BD-45C4-4190-A852-59D8720A9EDE}.Debug|x86.ActiveCfg = Debug|Any CPU
{262580BD-45C4-4190-A852-59D8720A9EDE}.Debug|x86.Build.0 = Debug|Any CPU
{262580BD-45C4-4190-A852-59D8720A9EDE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{262580BD-45C4-4190-A852-59D8720A9EDE}.Release|Any CPU.Build.0 = Release|Any CPU
{262580BD-45C4-4190-A852-59D8720A9EDE}.Release|x64.ActiveCfg = Release|Any CPU
{262580BD-45C4-4190-A852-59D8720A9EDE}.Release|x64.Build.0 = Release|Any CPU
{262580BD-45C4-4190-A852-59D8720A9EDE}.Release|x86.ActiveCfg = Release|Any CPU
{262580BD-45C4-4190-A852-59D8720A9EDE}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -182,6 +196,7 @@ Global
{328CE686-3CB0-4AC7-9779-866ABE310DF6} = {8BE98B06-91C5-4948-B5AA-F80C67849031}
{35F2204C-123D-4399-B5F1-5DEAF1F30C24} = {8BE98B06-91C5-4948-B5AA-F80C67849031}
{770469C8-531A-4317-9BCE-DFF61E79B944} = {8BE98B06-91C5-4948-B5AA-F80C67849031}
{262580BD-45C4-4190-A852-59D8720A9EDE} = {8BE98B06-91C5-4948-B5AA-F80C67849031}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {5493A436-6524-48E0-874D-CD70C1615AAF}
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 0.2.{build}
version: 0.3.{build}
image:
- Visual Studio 2017
# - Ubuntu
Expand Down
2 changes: 0 additions & 2 deletions src/Bolero.Server/Bolero.Server.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@
<ItemGroup>
<Compile Include="..\..\build\AssemblyInfo.fs" />
<Compile Include="Remoting.fs" />
<Compile Include="Templating.fs" />
<None Include="paket.references" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Bolero.Templating\Bolero.Templating.fsproj" />
<ProjectReference Include="..\Bolero\Bolero.fsproj" />
</ItemGroup>
<Import Project="..\..\.paket\Paket.Restore.targets" />
Expand Down
2 changes: 0 additions & 2 deletions src/Bolero.Server/paket.references
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
FSharp.Core
Microsoft.AspNetCore.Http.Abstractions
Microsoft.Extensions.DependencyInjection.Abstractions
Microsoft.AspNetCore.WebSockets
Microsoft.AspNetCore.Hosting.Abstractions
Microsoft.AspNetCore.SignalR
17 changes: 17 additions & 0 deletions src/Bolero.Templating.Server/Bolero.Templating.Server.fsproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\tools\Common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<BaseOutputPath>..\..\build</BaseOutputPath>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<ItemGroup>
<Compile Include="Templating.fs" />
<None Include="paket.references" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Bolero.Templating\Bolero.Templating.fsproj" />
</ItemGroup>
<Import Project="..\..\.paket\Paket.Restore.targets" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ type ServerTemplatingExtensions =

[<Extension>]
static member AddHotReload(this: IServiceCollection, ?templateDir: string) : IServiceCollection =
this.AddSignalRCore().AddJsonProtocol() |> ignore
this.AddSignalR().AddJsonProtocol() |> ignore
this.AddSingleton({ dir = templateDir })
.AddSingleton<Watcher>()
.AddTransient<IClient, Client>()
Expand Down
2 changes: 2 additions & 0 deletions src/Bolero.Templating.Server/paket.references
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
FSharp.Core
Microsoft.AspNetCore.SignalR
16 changes: 16 additions & 0 deletions src/Bolero.Templating/paket.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
type file
id Bolero.HotReload
description
HTML template hot reloading for Bolero: a set of tools and libraries to run F# applications in WebAssembly using Blazor
authors
Loic Denuziere
files
../../build/Release/netstandard2.0/Bolero.Templating.dll ==> lib/netstandard2.0
../../build/Release/netstandard2.0/Bolero.Templating.xml ==> lib/netstandard2.0
../../build/Release/netstandard2.0/Bolero.Templating.Server.dll ==> lib/netstandard2.0
../../build/Release/netstandard2.0/Bolero.Templating.Server.xml ==> lib/netstandard2.0
dependencies
Bolero CURRENTVERSION
HtmlAgilityPack >= LOCKED:Minor
Blazor.Extensions.SignalR >= LOCKED:Minor
Microsoft.AspNetCore.SignalR >= LOCKED:Minor
2 changes: 0 additions & 2 deletions src/Bolero/paket.template
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ files
../../build/Release/netstandard2.0/Bolero.xml ==> lib/netstandard2.0
../../build/Release/netstandard2.0/Bolero.Server.dll ==> lib/netstandard2.0
../../build/Release/netstandard2.0/Bolero.Server.xml ==> lib/netstandard2.0
../../build/Release/netstandard2.0/Bolero.Templating.dll ==> lib/netstandard2.0
../../build/Release/netstandard2.0/Bolero.Templating.xml ==> lib/netstandard2.0
../../build/Release/typeproviders/fsharp41/netstandard2.0/Bolero.Templating.Provider.dll ==> typeproviders/fsharp41/netstandard2.0
../../build/Release/typeproviders/fsharp41/netstandard2.0/HtmlAgilityPack.dll ==> typeproviders/fsharp41/netstandard2.0
../../build/Release/typeproviders/fsharp41/netstandard2.0/Microsoft.AspNetCore.Blazor.dll ==> typeproviders/fsharp41/netstandard2.0
Expand Down
1 change: 1 addition & 0 deletions tests/Remoting.Server/Remoting.Server.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<ItemGroup>
<ProjectReference Include="..\..\src\Bolero.Templating\Bolero.Templating.fsproj" />
<ProjectReference Include="..\..\src\Bolero\Bolero.fsproj" />
<ProjectReference Include="..\..\src\Bolero.Templating.Server\Bolero.Templating.Server.fsproj" />
<ProjectReference Include="..\..\src\Bolero.Server\Bolero.Server.fsproj" />
<ProjectReference Include="..\Remoting.Client\Remoting.Client.fsproj" />
</ItemGroup>
Expand Down

0 comments on commit eb7187f

Please sign in to comment.