From de15b7b1b945953470a8849bb9720f891dbfccb0 Mon Sep 17 00:00:00 2001 From: Ivan Josipovic <9521987+IvanJosipovic@users.noreply.github.com> Date: Thu, 5 Dec 2019 22:18:16 -0800 Subject: [PATCH 1/3] Updated to .Net Core 3.1 --- .github/workflows/cicd.yml | 6 ++--- .github/workflows/release.yml | 6 ++--- BlazorFileSaver.sln | 2 ++ README.md | 24 ++++++++++++------- .../BlazorFileSaver.Sample.csproj | 11 ++++----- src/BlazorFileSaver.Sample/wwwroot/index.html | 1 + src/BlazorFileSaver/BlazorFileSaver.csproj | 13 +++------- 7 files changed, 32 insertions(+), 31 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 72baa26..c3d986e 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -19,7 +19,7 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v1 with: - dotnet-version: 3.0.100 + dotnet-version: 3.1.000 - name: Publish working-directory: src/BlazorFileSaver.Sample @@ -28,7 +28,7 @@ jobs: - name: Deploy to Test uses: netlify/actions/cli@master with: - args: deploy --json -d src/BlazorFileSaver.Sample/bin/Release/netstandard2.0/publish/BlazorFileSaver.Sample/dist/ + args: deploy --json -d src/BlazorFileSaver.Sample/bin/Release/netstandard2.1/publish/BlazorFileSaver.Sample/dist/ env: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} @@ -37,7 +37,7 @@ jobs: if: github.ref == 'refs/heads/master' uses: netlify/actions/cli@master with: - args: deploy --prod --json -d src/BlazorFileSaver.Sample/bin/Release/netstandard2.0/publish/BlazorFileSaver.Sample/dist/ + args: deploy --prod --json -d src/BlazorFileSaver.Sample/bin/Release/netstandard2.1/publish/BlazorFileSaver.Sample/dist/ env: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ff0b2e0..d56e4ef 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,13 +19,13 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v1 with: - dotnet-version: 3.0.100 + dotnet-version: 3.1.000 - name: Dotnet Pack working-directory: src/BlazorFileSaver run: dotnet pack -c Release -p:Version=${GITHUB_REF##*/v} - - name: Dotnet Nuget Push + - name: Dotnet Nuget Push working-directory: src/BlazorFileSaver/bin/Release run: dotnet nuget push BlazorFileSaver.*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }} continue-on-error: true @@ -38,4 +38,4 @@ jobs: tag_name: ${{ github.ref }} release_name: Release ${{ github.ref }} draft: false - prerelease: false + prerelease: false \ No newline at end of file diff --git a/BlazorFileSaver.sln b/BlazorFileSaver.sln index 995a59c..d4c59ef 100644 --- a/BlazorFileSaver.sln +++ b/BlazorFileSaver.sln @@ -7,7 +7,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorFileSaver", "src\Blaz EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A7D52708-5E84-4D50-843F-E52B759590FF}" ProjectSection(SolutionItems) = preProject + .github\workflows\cicd.yml = .github\workflows\cicd.yml README.md = README.md + .github\workflows\release.yml = .github\workflows\release.yml EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorFileSaver.Sample", "src\BlazorFileSaver.Sample\BlazorFileSaver.Sample.csproj", "{DE2E2866-4BFE-471F-ADE0-EB206834B63F}" diff --git a/README.md b/README.md index 35c2ca5..db1374c 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,18 @@ # BlazorFileSaver -Blazor Component wrapper for [FileSaver.js](https://github.com/eligrey/FileSaver.js/) + [![Nuget (with prereleases)](https://img.shields.io/nuget/vpre/BlazorFileSaver.svg)](https://www.nuget.org/packages/BlazorFileSaver) +Blazor Component wrapper for [FileSaver.js](https://github.com/eligrey/FileSaver.js/) -# Installation -[![Nuget (with prereleases)](https://img.shields.io/nuget/vpre/BlazorFileSaver.svg)](https://www.nuget.org/packages/BlazorFileSaver) +# Demo +[Sample](https://blazorfilesaver.netlify.com) +# Installation -# Demo -[Sample](https://blazorfilesaver.netlify.com) +- Add Nuget BlazorFileSaver +- Add ```` to the index.html or _Hosts.cshtml +- Add AddBlazorFileSaver() to the ConfigureServices in Startup.cs as noted below # Startup.cs @@ -35,16 +38,19 @@ namespace BlazorFileSaver.Sample # Example ```csharp @page "/sample" +

BlazorFileSaver.Sample

- + -Save +Save - + @code { - [Inject] private IBlazorFileSaver BlazorFileSaver { get; set; } + [Inject] + private IBlazorFileSaver BlazorFileSaver { get; set; } + private string FileName { get; set; } = "Sample.txt"; private string Data { get; set; } = "Sample Text"; diff --git a/src/BlazorFileSaver.Sample/BlazorFileSaver.Sample.csproj b/src/BlazorFileSaver.Sample/BlazorFileSaver.Sample.csproj index b1aca68..a0d2480 100644 --- a/src/BlazorFileSaver.Sample/BlazorFileSaver.Sample.csproj +++ b/src/BlazorFileSaver.Sample/BlazorFileSaver.Sample.csproj @@ -1,16 +1,15 @@  - netstandard2.0 - Exe - 7.3 + netstandard2.1 + latest 3.0 - - - + + + diff --git a/src/BlazorFileSaver.Sample/wwwroot/index.html b/src/BlazorFileSaver.Sample/wwwroot/index.html index 2f02a14..3751578 100644 --- a/src/BlazorFileSaver.Sample/wwwroot/index.html +++ b/src/BlazorFileSaver.Sample/wwwroot/index.html @@ -12,5 +12,6 @@ Loading... + diff --git a/src/BlazorFileSaver/BlazorFileSaver.csproj b/src/BlazorFileSaver/BlazorFileSaver.csproj index 2184e94..16c2c30 100644 --- a/src/BlazorFileSaver/BlazorFileSaver.csproj +++ b/src/BlazorFileSaver/BlazorFileSaver.csproj @@ -1,7 +1,7 @@  - netstandard2.0 + netstandard2.1 3.0 true BlazorFileSaver @@ -20,15 +20,8 @@ - - - - - - - - - + + From 92f14c1d5325cebc54b1b8013a7748b925964a84 Mon Sep 17 00:00:00 2001 From: Ivan Josipovic <9521987+IvanJosipovic@users.noreply.github.com> Date: Thu, 5 Dec 2019 22:28:44 -0800 Subject: [PATCH 2/3] Update cicd.yml --- .github/workflows/cicd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index c3d986e..9d46ca6 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -19,7 +19,7 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v1 with: - dotnet-version: 3.1.000 + dotnet-version: 3.1.100 - name: Publish working-directory: src/BlazorFileSaver.Sample From a4f6a909d2297dfe58c323d5cfc6d6e7b1318936 Mon Sep 17 00:00:00 2001 From: Ivan Josipovic <9521987+IvanJosipovic@users.noreply.github.com> Date: Thu, 5 Dec 2019 22:28:57 -0800 Subject: [PATCH 3/3] Update release.yml --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d56e4ef..a9ea7b3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,7 +19,7 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v1 with: - dotnet-version: 3.1.000 + dotnet-version: 3.1.100 - name: Dotnet Pack working-directory: src/BlazorFileSaver @@ -38,4 +38,4 @@ jobs: tag_name: ${{ github.ref }} release_name: Release ${{ github.ref }} draft: false - prerelease: false \ No newline at end of file + prerelease: false