Skip to content

Commit 0ba5ff0

Browse files
committed
- Mark version as 0.1.0
- Implement BrowserConsoleLogger with everything needed based on the ConsoleLogger in MEL - Add build props for packaging, source linking - Remove extra pieces from Test project
1 parent d59d8b9 commit 0ba5ff0

60 files changed

Lines changed: 3158 additions & 1193 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Directory.Build.props

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<Project>
2+
<!-- Set common properties regarding assembly information and nuget packages -->
3+
<PropertyGroup>
4+
<Authors>Blazor Extensions Contributors</Authors>
5+
<Product>Blazor Extensions</Product>
6+
<Copyright>© Blazor Extensions Contributors. All rights reserved.</Copyright>
7+
<PackageLicenseUrl>https://github.com/BlazorExtensions/Logging#license</PackageLicenseUrl>
8+
<PackageProjectUrl>https://github.com/BlazorExtensions/Logging</PackageProjectUrl>
9+
<PackageIconUrl>https://avatars2.githubusercontent.com/u/38994076?s%3D128%3Dv%3D4</PackageIconUrl>
10+
<PackageTags>Microsoft Blazor Extensions Logging</PackageTags>
11+
<PackageReleaseNotes></PackageReleaseNotes>
12+
<RepositoryUrl>https://github.com/BlazorExtensions/Logging</RepositoryUrl>
13+
<RepositoryType>git</RepositoryType>
14+
<IncludeSymbols>true</IncludeSymbols>
15+
</PropertyGroup>
16+
17+
<!-- Common compile parameters -->
18+
<PropertyGroup>
19+
<LangVersion>latest</LangVersion>
20+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
21+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
22+
<!-- We use full (Windows PDBs) until cross platform support for source link will get better -->
23+
<DebugType>full</DebugType>
24+
</PropertyGroup>
25+
26+
<PropertyGroup>
27+
<TargetFramework>netstandard2.0</TargetFramework>
28+
<TestProjectTargetFramework>netstandard2.0</TestProjectTargetFramework>
29+
</PropertyGroup>
30+
31+
<!-- Versioning properties -->
32+
<PropertyGroup>
33+
<VersionPrefix Condition=" '$(VersionPrefix)'=='' ">0.1.0</VersionPrefix>
34+
<VersionSuffix Condition=" '$(VersionSuffix)'=='' ">dev</VersionSuffix>
35+
</PropertyGroup>
36+
37+
<Choose>
38+
<When Condition="'$(OfficialBuild)' != 'true'">
39+
<!-- On non-official builds we don't burn in a git sha. In large part because it
40+
hurts our determinism efforts as binaries which should be the same between
41+
builds will not (due to developers building against different HEAD
42+
values -->
43+
<PropertyGroup>
44+
<GitHeadSha>&lt;developer build&gt;</GitHeadSha>
45+
</PropertyGroup>
46+
</When>
47+
<When Condition="'$(BUILD_SOURCEVERSION)' != ''">
48+
<PropertyGroup>
49+
<GitHeadSha>$(BUILD_SOURCEVERSION)</GitHeadSha>
50+
</PropertyGroup>
51+
</When>
52+
<When Condition="'$(BUILD_SOURCEVERSION)' == '' AND '$(GIT_COMMIT)' != ''">
53+
<PropertyGroup>
54+
<GitHeadSha>$(GIT_COMMIT)</GitHeadSha>
55+
</PropertyGroup>
56+
</When>
57+
<Otherwise>
58+
<PropertyGroup>
59+
<GitHeadSha>Not found</GitHeadSha>
60+
<DotGitDir>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory).git'))</DotGitDir>
61+
<HeadFileContent Condition="Exists('$(DotGitDir)/HEAD')">$([System.IO.File]::ReadAllText('$(DotGitDir)/HEAD').Trim())</HeadFileContent>
62+
<RefPath Condition="$(HeadFileContent.StartsWith('ref: '))">$(DotGitDir)/$(HeadFileContent.Substring(5))</RefPath>
63+
<GitHeadSha Condition="'$(RefPath)' != '' AND Exists('$(RefPath)')">$([System.IO.File]::ReadAllText('$(RefPath)').Trim())</GitHeadSha>
64+
<GitHeadSha Condition="'$(HeadFileContent)' != '' AND '$(RefPath)' == ''">$(HeadFileContent)</GitHeadSha>
65+
</PropertyGroup>
66+
</Otherwise>
67+
</Choose>
68+
</Project>

Directory.Build.targets

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<Project>
2+
<!-- Set InformationVersion here, since $(Version) is already set at this point. -->
3+
<PropertyGroup>
4+
<InformationalVersion>$(Version). Commit Hash: $(GitHeadSha)</InformationalVersion>
5+
</PropertyGroup>
6+
</Project>

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2018 Blazor Extensions
3+
Copyright (c) 2018 Blazor Extensions Contributors
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

BlazorLogging.sln renamed to Logging.sln

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,16 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{B286BCBD-DAD
77
EndProject
88
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{20DAA632-F8AD-4C5F-9E5F-FC82B7CB56A7}"
99
EndProject
10-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorLogging", "src\BlazorLogging\BlazorLogging.csproj", "{9378C7BF-0899-4835-B8FB-099292C8C63D}"
10+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Blazor.Extensions.Logging", "src\Blazor.Extensions.Logging\Blazor.Extensions.Logging.csproj", "{9378C7BF-0899-4835-B8FB-099292C8C63D}"
1111
EndProject
1212
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8A34FDEB-D488-4AE3-887B-8254B33C7A13}"
1313
ProjectSection(SolutionItems) = preProject
1414
README.md = README.md
1515
EndProjectSection
1616
EndProject
17-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlazorLogging.Test", "test\BlazorLogging.Test\BlazorLogging.Test.csproj", "{C4BB6A39-28E6-454D-8679-92562CEAD0A9}"
17+
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}"
18+
EndProject
19+
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}"
1820
EndProject
1921
Global
2022
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -50,13 +52,26 @@ Global
5052
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Release|x64.Build.0 = Release|Any CPU
5153
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Release|x86.ActiveCfg = Release|Any CPU
5254
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Release|x86.Build.0 = Release|Any CPU
55+
{1C49147F-7C73-4962-A71C-6A193970D058}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
56+
{1C49147F-7C73-4962-A71C-6A193970D058}.Debug|Any CPU.Build.0 = Debug|Any CPU
57+
{1C49147F-7C73-4962-A71C-6A193970D058}.Debug|x64.ActiveCfg = Debug|Any CPU
58+
{1C49147F-7C73-4962-A71C-6A193970D058}.Debug|x64.Build.0 = Debug|Any CPU
59+
{1C49147F-7C73-4962-A71C-6A193970D058}.Debug|x86.ActiveCfg = Debug|Any CPU
60+
{1C49147F-7C73-4962-A71C-6A193970D058}.Debug|x86.Build.0 = Debug|Any CPU
61+
{1C49147F-7C73-4962-A71C-6A193970D058}.Release|Any CPU.ActiveCfg = Release|Any CPU
62+
{1C49147F-7C73-4962-A71C-6A193970D058}.Release|Any CPU.Build.0 = Release|Any CPU
63+
{1C49147F-7C73-4962-A71C-6A193970D058}.Release|x64.ActiveCfg = Release|Any CPU
64+
{1C49147F-7C73-4962-A71C-6A193970D058}.Release|x64.Build.0 = Release|Any CPU
65+
{1C49147F-7C73-4962-A71C-6A193970D058}.Release|x86.ActiveCfg = Release|Any CPU
66+
{1C49147F-7C73-4962-A71C-6A193970D058}.Release|x86.Build.0 = Release|Any CPU
5367
EndGlobalSection
5468
GlobalSection(SolutionProperties) = preSolution
5569
HideSolutionNode = FALSE
5670
EndGlobalSection
5771
GlobalSection(NestedProjects) = preSolution
5872
{9378C7BF-0899-4835-B8FB-099292C8C63D} = {B286BCBD-DAD8-4DE7-9334-3DE18DF233AF}
5973
{C4BB6A39-28E6-454D-8679-92562CEAD0A9} = {20DAA632-F8AD-4C5F-9E5F-FC82B7CB56A7}
74+
{1C49147F-7C73-4962-A71C-6A193970D058} = {B286BCBD-DAD8-4DE7-9334-3DE18DF233AF}
6075
EndGlobalSection
6176
GlobalSection(ExtensibilityGlobals) = postSolution
6277
SolutionGuid = {A97C0A4B-E309-4485-BB76-898B37BFBFFF}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# BlazorLogging
2-
Microsoft Extension Logging implementation for ASP.Net Blazor
1+
# Blazor.Eetensions.Logger
2+
Microsoft Extension Logging implementation for ASP.NET Blazor.
33

44
> Note: This is a work in progress.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/
2+
dist/
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>netstandard2.0</TargetFramework>
5+
<OutputType>Library</OutputType>
6+
<IsPackable>true</IsPackable>
7+
<BlazorLinkOnBuild>false</BlazorLinkOnBuild>
8+
<LangVersion>latest</LangVersion>
9+
<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>
10+
<TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>
11+
<DefaultItemExcludes>${DefaultItemExcludes};dist\**;node_modules\**</DefaultItemExcludes>
12+
<NoWarn>CS2008</NoWarn>
13+
14+
<!-- VS's FastUpToDateCheck doesn't consider .ts file changes, so it's necessary to disable it to get incremental builds to work correctly (albeit not as fast as if FastUpToDateCheck did work for them) -->
15+
<DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
16+
</PropertyGroup>
17+
18+
<ItemGroup>
19+
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="2.0.0" />
20+
<PackageReference Include="Microsoft.AspNetCore.Blazor.Build" Version="0.3.0" />
21+
<WebpackInputs Include="**\*.ts" Exclude="dist\**;node_modules\**" />
22+
</ItemGroup>
23+
24+
<ItemGroup>
25+
<WebpackInputs Remove="src\LogObject.ts" />
26+
<WebpackInputs Remove="src\LogObjectType.ts" />
27+
</ItemGroup>
28+
29+
<Target Name="EnsureNpmRestored" Condition="!Exists('node_modules')">
30+
<Message Importance="high" Text="Restoring dependencies using 'npm'. This may take several minutes..." />
31+
<Exec Command="npm install" />
32+
</Target>
33+
34+
<Target Name="RunWebpack" AfterTargets="ResolveReferences" Inputs="@(WebpackInputs)" Outputs="dist\blazor.extensions.logging.js" DependsOnTargets="EnsureNpmRestored">
35+
<RemoveDir Directories="dist" />
36+
<Exec Command="npm run build" />
37+
<ItemGroup>
38+
<EmbeddedResource Include="dist\**\*.js" LogicalName="blazor:js:%(RecursiveDir)%(Filename)%(Extension)" />
39+
</ItemGroup>
40+
</Target>
41+
</Project>

0 commit comments

Comments
 (0)