Skip to content
This repository has been archived by the owner on Jul 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #9 from IvanJosipovic/dev
Browse files Browse the repository at this point in the history
Updated to .Net 3.1.1
  • Loading branch information
IvanJosipovic authored Feb 18, 2020
2 parents 44afee7 + ac9ab1b commit c6b6d33
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 42 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.100
dotnet-version: 3.1.101

- name: Publish
working-directory: src/BlazorFileSaver.Sample
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.100
dotnet-version: 3.1.101

- name: Dotnet Pack
working-directory: src/BlazorFileSaver
Expand Down
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,26 @@ Blazor Component wrapper for [FileSaver.js](https://github.com/eligrey/FileSaver

# Installation

- Add Nuget BlazorFileSaver
- Add Nuget [BlazorFileSaver](https://www.nuget.org/packages/BlazorTable)
- Add ``<script src="_content/BlazorFileSaver/BlazorFileSaver.min.js"></script>`` to the index.html or _Hosts.cshtml
- Add AddBlazorFileSaver() to the ConfigureServices in Startup.cs as noted below
- Add AddBlazorFileSaver() to the ConfigureServices in Program.cs as noted below


# Startup.cs
# Program.cs
```csharp
namespace BlazorFileSaver.Sample
{
public class Startup
public class Program
{
public void ConfigureServices(IServiceCollection services)
public static async Task Main(string[] args)
{
services.AddBlazorFileSaver(); // Add This!
}
var builder = WebAssemblyHostBuilder.CreateDefault(args);

builder.RootComponents.Add<App>("app");

public void Configure(IComponentsApplicationBuilder app)
{
app.AddComponent<App>("app");
builder.Services.AddBlazorFileSaver(); // Add This!
await builder.Build().RunAsync();
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions src/BlazorFileSaver.Sample/BlazorFileSaver.Sample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Blazor" Version="3.1.0-preview4.19579.2" />
<PackageReference Include="Microsoft.AspNetCore.Blazor.Build" Version="3.1.0-preview4.19579.2" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Blazor.DevServer" Version="3.1.0-preview4.19579.2" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Blazor" Version="3.2.0-preview1.20073.1" />
<PackageReference Include="Microsoft.AspNetCore.Blazor.Build" Version="3.2.0-preview1.20073.1" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Blazor.DevServer" Version="3.2.0-preview1.20073.1" PrivateAssets="all" />

<PackageReference Include="SharpZipLib" Version="1.2.0" />
</ItemGroup>
Expand Down
15 changes: 9 additions & 6 deletions src/BlazorFileSaver.Sample/Program.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
using Microsoft.AspNetCore.Blazor.Hosting;
using System.Threading.Tasks;

namespace BlazorFileSaver.Sample
{
public class Program
{
public static void Main(string[] args)
public static async Task Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}
var builder = WebAssemblyHostBuilder.CreateDefault(args);

builder.RootComponents.Add<App>("app");

builder.Services.AddBlazorFileSaver();

public static IWebAssemblyHostBuilder CreateHostBuilder(string[] args) =>
BlazorWebAssemblyHost.CreateDefaultBuilder()
.UseBlazorStartup<Startup>();
await builder.Build().RunAsync();
}
}
}
18 changes: 0 additions & 18 deletions src/BlazorFileSaver.Sample/Startup.cs

This file was deleted.

7 changes: 4 additions & 3 deletions src/BlazorFileSaver/BlazorFileSaver.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@
<RazorLangVersion>3.0</RazorLangVersion>
<IsPackable>true</IsPackable>
<Title>BlazorFileSaver</Title>
<PackageId>BlazorFileSaver</PackageId>
<Description>Blazor Component wrapper for FileSaver.js</Description>
<Authors>Ivan Josipovic</Authors>
<PackageProjectUrl>https://blazorfilesaver.netlify.com/</PackageProjectUrl>
<PackageProjectUrl>https://blazorfilesaver.netlify.com</PackageProjectUrl>
<PackageTags>Blazor;File;Save;FileSave;FileSaver</PackageTags>
<PackageIcon>icon.png</PackageIcon>
<RepositoryUrl>https://github.com/IvanJosipovic/BlazorFileSaver</RepositoryUrl>
Expand All @@ -20,8 +21,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components" Version="3.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="3.1.0" />
<PackageReference Include="Microsoft.AspNetCore.Components" Version="3.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="3.1.1" />
</ItemGroup>

</Project>

0 comments on commit c6b6d33

Please sign in to comment.