Skip to content

Commit

Permalink
Merge pull request #53 from BlazorExtensions/blazorrc1
Browse files Browse the repository at this point in the history
feat: update to blazor rc1
  • Loading branch information
galvesribeiro authored May 1, 2020
2 parents 7bfa62e + 24d5d48 commit d14575a
Show file tree
Hide file tree
Showing 34 changed files with 3,201 additions and 4,926 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.100-preview1-014459
dotnet-version: 3.1.201
- name: Build
run: dotnet build --configuration Release
run: dotnet build --configuration Release
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.100-preview1-014459
dotnet-version: 3.1.201
- name: Build
run: dotnet build --configuration Release
- name: Pack
Expand Down
142 changes: 74 additions & 68 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,68 +1,74 @@
<Project>
<!-- Set common properties regarding assembly information and nuget packages -->
<PropertyGroup>
<Authors>Blazor Extensions Contributors</Authors>
<Product>Blazor Extensions</Product>
<Copyright>(c) Blazor Extensions Contributors. All rights reserved.</Copyright>
<PackageLicenseUrl>https://github.com/BlazorExtensions/Logging#license</PackageLicenseUrl>
<PackageProjectUrl>https://github.com/BlazorExtensions/Logging</PackageProjectUrl>
<PackageIconUrl>https://avatars2.githubusercontent.com/u/38994076?s%3D128%26v%3D4</PackageIconUrl>
<PackageTags>Microsoft ASP.NET Core Blazor Extensions Logging</PackageTags>
<PackageReleaseNotes></PackageReleaseNotes>
<RepositoryUrl>https://github.com/BlazorExtensions/Logging</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<IncludeSymbols>true</IncludeSymbols>
</PropertyGroup>

<!-- Common compile parameters -->
<PropertyGroup>
<LangVersion>latest</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<!-- We use full (Windows PDBs) until cross platform support for source link will get better -->
<DebugType>full</DebugType>
</PropertyGroup>

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TestProjectTargetFramework>netstandard2.0</TestProjectTargetFramework>
</PropertyGroup>

<!-- Versioning properties -->
<PropertyGroup>
<VersionPrefix Condition=" '$(VersionPrefix)'=='' ">3.1.0</VersionPrefix>
<VersionSuffix Condition=" '$(VersionSuffix)'=='' ">preview1-014459</VersionSuffix>
</PropertyGroup>

<Choose>
<When Condition="'$(OfficialBuild)' != 'true'">
<!-- On non-official builds we don't burn in a git sha. In large part because it
hurts our determinism efforts as binaries which should be the same between
builds will not (due to developers building against different HEAD
values -->
<PropertyGroup>
<GitHeadSha>&lt;developer build&gt;</GitHeadSha>
</PropertyGroup>
</When>
<When Condition="'$(BUILD_SOURCEVERSION)' != ''">
<PropertyGroup>
<GitHeadSha>$(BUILD_SOURCEVERSION)</GitHeadSha>
</PropertyGroup>
</When>
<When Condition="'$(BUILD_SOURCEVERSION)' == '' AND '$(GIT_COMMIT)' != ''">
<PropertyGroup>
<GitHeadSha>$(GIT_COMMIT)</GitHeadSha>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<GitHeadSha>Not found</GitHeadSha>
<DotGitDir>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory).git'))</DotGitDir>
<HeadFileContent Condition="Exists('$(DotGitDir)/HEAD')">$([System.IO.File]::ReadAllText('$(DotGitDir)/HEAD').Trim())</HeadFileContent>
<RefPath Condition="$(HeadFileContent.StartsWith('ref: '))">$(DotGitDir)/$(HeadFileContent.Substring(5))</RefPath>
<GitHeadSha Condition="'$(RefPath)' != '' AND Exists('$(RefPath)')">$([System.IO.File]::ReadAllText('$(RefPath)').Trim())</GitHeadSha>
<GitHeadSha Condition="'$(HeadFileContent)' != '' AND '$(RefPath)' == ''">$(HeadFileContent)</GitHeadSha>
</PropertyGroup>
</Otherwise>
</Choose>
</Project>
<Project>
<!-- Set common properties regarding assembly information and nuget packages -->
<PropertyGroup>
<Authors>Blazor Extensions Contributors</Authors>
<Product>Blazor Extensions</Product>
<Copyright>(c) Blazor Extensions Contributors. All rights reserved.</Copyright>
<PackageLicense>LICENSE</PackageLicense>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/BlazorExtensions/Logging</PackageProjectUrl>
<PackageIcon>BlazorExtensions.png</PackageIcon>
<PackageTags>Microsoft ASP.NET Core Blazor Extensions Logging</PackageTags>
<PackageReleaseNotes></PackageReleaseNotes>
<RepositoryUrl>https://github.com/BlazorExtensions/Logging</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<IncludeSymbols>true</IncludeSymbols>
</PropertyGroup>

<ItemGroup>
<None Include="BlazorExtensions.png" Pack="true" PackagePath=""/>
<None Include="../../LICENSE" Pack="true" PackagePath=""/>
</ItemGroup>

<!-- Common compile parameters -->
<PropertyGroup>
<LangVersion>latest</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<!-- We use full (Windows PDBs) until cross platform support for source link will get better -->
<DebugType>full</DebugType>
</PropertyGroup>

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<TestProjectTargetFramework>netstandard2.1</TestProjectTargetFramework>
</PropertyGroup>

<!-- Versioning properties -->
<PropertyGroup>
<VersionPrefix Condition=" '$(VersionPrefix)'=='' ">3.1.0</VersionPrefix>
<VersionSuffix Condition=" '$(VersionSuffix)'=='' ">rc1-020501</VersionSuffix>
</PropertyGroup>

<Choose>
<When Condition="'$(OfficialBuild)' != 'true'">
<!-- On non-official builds we don't burn in a git sha. In large part because it
hurts our determinism efforts as binaries which should be the same between
builds will not (due to developers building against different HEAD
values -->
<PropertyGroup>
<GitHeadSha>&lt;developer build&gt;</GitHeadSha>
</PropertyGroup>
</When>
<When Condition="'$(BUILD_SOURCEVERSION)' != ''">
<PropertyGroup>
<GitHeadSha>$(BUILD_SOURCEVERSION)</GitHeadSha>
</PropertyGroup>
</When>
<When Condition="'$(BUILD_SOURCEVERSION)' == '' AND '$(GIT_COMMIT)' != ''">
<PropertyGroup>
<GitHeadSha>$(GIT_COMMIT)</GitHeadSha>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<GitHeadSha>Not found</GitHeadSha>
<DotGitDir>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory).git'))</DotGitDir>
<HeadFileContent Condition="Exists('$(DotGitDir)/HEAD')">$([System.IO.File]::ReadAllText('$(DotGitDir)/HEAD').Trim())</HeadFileContent>
<RefPath Condition="$(HeadFileContent.StartsWith('ref: '))">$(DotGitDir)/$(HeadFileContent.Substring(5))</RefPath>
<GitHeadSha Condition="'$(RefPath)' != '' AND Exists('$(RefPath)')">$([System.IO.File]::ReadAllText('$(RefPath)').Trim())</GitHeadSha>
<GitHeadSha Condition="'$(HeadFileContent)' != '' AND '$(RefPath)' == ''">$(HeadFileContent)</GitHeadSha>
</PropertyGroup>
</Otherwise>
</Choose>
</Project>
150 changes: 67 additions & 83 deletions Logging.sln
Original file line number Diff line number Diff line change
@@ -1,83 +1,67 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28822.285
MinimumVisualStudioVersion = 15.0.26124.0
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{B286BCBD-DAD8-4DE7-9334-3DE18DF233AF}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{20DAA632-F8AD-4C5F-9E5F-FC82B7CB56A7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Blazor.Extensions.Logging", "src\Blazor.Extensions.Logging\Blazor.Extensions.Logging.csproj", "{9378C7BF-0899-4835-B8FB-099292C8C63D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8A34FDEB-D488-4AE3-887B-8254B33C7A13}"
ProjectSection(SolutionItems) = preProject
.vsts-ci.yml = .vsts-ci.yml
.vsts-release.yml = .vsts-release.yml
Directory.Build.props = Directory.Build.props
Directory.Build.targets = Directory.Build.targets
README.md = README.md
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Blazor.Extensions.Logging.Test", "test\Blazor.Extensions.Logging.Test\Blazor.Extensions.Logging.Test.csproj", "{C4BB6A39-28E6-454D-8679-92562CEAD0A9}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Blazor.Extensions.Logging.JS", "src\Blazor.Extensions.Logging.JS\Blazor.Extensions.Logging.JS.csproj", "{1C49147F-7C73-4962-A71C-6A193970D058}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Debug|x64.ActiveCfg = Debug|Any CPU
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Debug|x64.Build.0 = Debug|Any CPU
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Debug|x86.ActiveCfg = Debug|Any CPU
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Debug|x86.Build.0 = Debug|Any CPU
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Release|Any CPU.Build.0 = Release|Any CPU
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Release|x64.ActiveCfg = Release|Any CPU
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Release|x64.Build.0 = Release|Any CPU
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Release|x86.ActiveCfg = Release|Any CPU
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Release|x86.Build.0 = Release|Any CPU
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Debug|x64.ActiveCfg = Debug|Any CPU
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Debug|x64.Build.0 = Debug|Any CPU
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Debug|x86.ActiveCfg = Debug|Any CPU
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Debug|x86.Build.0 = Debug|Any CPU
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Release|Any CPU.Build.0 = Release|Any CPU
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Release|x64.ActiveCfg = Release|Any CPU
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Release|x64.Build.0 = Release|Any CPU
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Release|x86.ActiveCfg = Release|Any CPU
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Release|x86.Build.0 = Release|Any CPU
{1C49147F-7C73-4962-A71C-6A193970D058}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1C49147F-7C73-4962-A71C-6A193970D058}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1C49147F-7C73-4962-A71C-6A193970D058}.Debug|x64.ActiveCfg = Debug|Any CPU
{1C49147F-7C73-4962-A71C-6A193970D058}.Debug|x64.Build.0 = Debug|Any CPU
{1C49147F-7C73-4962-A71C-6A193970D058}.Debug|x86.ActiveCfg = Debug|Any CPU
{1C49147F-7C73-4962-A71C-6A193970D058}.Debug|x86.Build.0 = Debug|Any CPU
{1C49147F-7C73-4962-A71C-6A193970D058}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1C49147F-7C73-4962-A71C-6A193970D058}.Release|Any CPU.Build.0 = Release|Any CPU
{1C49147F-7C73-4962-A71C-6A193970D058}.Release|x64.ActiveCfg = Release|Any CPU
{1C49147F-7C73-4962-A71C-6A193970D058}.Release|x64.Build.0 = Release|Any CPU
{1C49147F-7C73-4962-A71C-6A193970D058}.Release|x86.ActiveCfg = Release|Any CPU
{1C49147F-7C73-4962-A71C-6A193970D058}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{9378C7BF-0899-4835-B8FB-099292C8C63D} = {B286BCBD-DAD8-4DE7-9334-3DE18DF233AF}
{C4BB6A39-28E6-454D-8679-92562CEAD0A9} = {20DAA632-F8AD-4C5F-9E5F-FC82B7CB56A7}
{1C49147F-7C73-4962-A71C-6A193970D058} = {B286BCBD-DAD8-4DE7-9334-3DE18DF233AF}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {A97C0A4B-E309-4485-BB76-898B37BFBFFF}
EndGlobalSection
EndGlobal
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28822.285
MinimumVisualStudioVersion = 15.0.26124.0
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{B286BCBD-DAD8-4DE7-9334-3DE18DF233AF}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{20DAA632-F8AD-4C5F-9E5F-FC82B7CB56A7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Blazor.Extensions.Logging", "src\Blazor.Extensions.Logging\Blazor.Extensions.Logging.csproj", "{9378C7BF-0899-4835-B8FB-099292C8C63D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8A34FDEB-D488-4AE3-887B-8254B33C7A13}"
ProjectSection(SolutionItems) = preProject
.vsts-ci.yml = .vsts-ci.yml
.vsts-release.yml = .vsts-release.yml
Directory.Build.props = Directory.Build.props
Directory.Build.targets = Directory.Build.targets
README.md = README.md
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Blazor.Extensions.Logging.Test", "test\Blazor.Extensions.Logging.Test\Blazor.Extensions.Logging.Test.csproj", "{C4BB6A39-28E6-454D-8679-92562CEAD0A9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Debug|x64.ActiveCfg = Debug|Any CPU
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Debug|x64.Build.0 = Debug|Any CPU
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Debug|x86.ActiveCfg = Debug|Any CPU
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Debug|x86.Build.0 = Debug|Any CPU
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Release|Any CPU.Build.0 = Release|Any CPU
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Release|x64.ActiveCfg = Release|Any CPU
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Release|x64.Build.0 = Release|Any CPU
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Release|x86.ActiveCfg = Release|Any CPU
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Release|x86.Build.0 = Release|Any CPU
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Debug|x64.ActiveCfg = Debug|Any CPU
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Debug|x64.Build.0 = Debug|Any CPU
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Debug|x86.ActiveCfg = Debug|Any CPU
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Debug|x86.Build.0 = Debug|Any CPU
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Release|Any CPU.Build.0 = Release|Any CPU
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Release|x64.ActiveCfg = Release|Any CPU
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Release|x64.Build.0 = Release|Any CPU
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Release|x86.ActiveCfg = Release|Any CPU
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{9378C7BF-0899-4835-B8FB-099292C8C63D} = {B286BCBD-DAD8-4DE7-9334-3DE18DF233AF}
{C4BB6A39-28E6-454D-8679-92562CEAD0A9} = {20DAA632-F8AD-4C5F-9E5F-FC82B7CB56A7}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {A97C0A4B-E309-4485-BB76-898B37BFBFFF}
EndGlobalSection
EndGlobal
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,20 @@ Some of the log levels are not available as distinct methods in the browser's de

## Setup

The following snippet shows how to setup the browser console logger by registering it for dependency injection in the ```Startup.cs``` of the application.
The following snippet shows how to setup the browser console logger by registering it for dependency injection in the ```Program.cs``` of the application.

```c#
public void ConfigureServices(IServiceCollection services)
{
services.AddLogging(builder => builder
.AddBrowserConsole() // Add Blazor.Extensions.Logging.BrowserConsoleLogger
.SetMinimumLevel(LogLevel.Trace)
);
}
// Add Blazor.Extensions.Logging.BrowserConsoleLogger
builder.Services.AddLogging(builder => builder
.AddBrowserConsole()
.SetMinimumLevel(LogLevel.Trace)
);
```

Add the ```script``` tag to ```wwwroot/index.html```.

```html
<script src="_content/Blazor.Extensions.Logging/blazor.extensions.logging.js" defer></script>
```

## Usage
Expand Down

This file was deleted.

Loading

0 comments on commit d14575a

Please sign in to comment.