Skip to content

Commit

Permalink
Merge pull request #4 from atc-net/hotfix/change-script-path
Browse files Browse the repository at this point in the history
Hotfix/change script path
  • Loading branch information
davidkallesen authored Mar 1, 2022
2 parents 92f113e + 1d79ebf commit 6a06b16
Show file tree
Hide file tree
Showing 14 changed files with 65 additions and 39 deletions.
21 changes: 17 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# ATC coding rules - https://github.com/atc-net/atc-coding-rules
# Version: 1.0.7
# Updated: 18-06-2021
# Version: 1.0.9
# Updated: 01-02-2022
# Location: Root
# Distribution: DotNet6
# Inspired by: https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/code-style-rule-options

##########################################
Expand Down Expand Up @@ -45,6 +46,7 @@ indent_size = 2

# Markdown Files
[*.md]
trim_trailing_whitespace = false

# Web Files
[*.{htm,html,js,jsm,ts,tsx,css,sass,scss,less,svg,vue}]
Expand All @@ -54,8 +56,13 @@ indent_size = 2
[*.{cmd,bat}]
end_of_line = crlf

# Shell scripts/files
[*.{sh,ps1}]
# Bash Files
[*.sh]
end_of_line = lf
indent_size = 2

# Powershell
[*.ps1]
end_of_line = lf
indent_size = 2

Expand Down Expand Up @@ -487,6 +494,12 @@ dotnet_diagnostic.SA1649.severity = error # https://github.com/atc-net
dotnet_diagnostic.S1135.severity = suggestion # https://github.com/atc-net/atc-coding-rules/blob/main/documentation/CodeAnalyzersRules/SonarAnalyzerCSharp/S1135.md


##########################################
# Custom - File Extension Settings
##########################################


##########################################
# Custom - Code Analyzers Rules
##########################################
[*.{cs,csx,cake}]
4 changes: 2 additions & 2 deletions .github/workflows/pre-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- reopened

jobs:
dotnet5-build:
dotnet-build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
Expand Down Expand Up @@ -36,7 +36,7 @@ jobs:
dotnet-test:
runs-on: ubuntu-latest
needs:
- dotnet5-build
- dotnet-build
steps:
- name: 🛒 Checkout repository
uses: actions/checkout@v2
Expand Down
5 changes: 5 additions & 0 deletions Atc.Blazor.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Atc.Blazor.ColorThemePrefer
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Atc.Blazor.Sample", "sample\Atc.Blazor.Sample\Atc.Blazor.Sample.csproj", "{3875CEE1-DBED-4999-B1F6-F5D45E14BEF6}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Docs", "Docs", "{DCB86DDD-727D-461E-8D80-7FC6ACFF6232}"
ProjectSection(SolutionItems) = preProject
README.md = README.md
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down
4 changes: 2 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@
<ItemGroup Label="Code Analyzers">
<PackageReference Include="AsyncFixer" Version="1.5.1" PrivateAssets="All" />
<PackageReference Include="Asyncify" Version="0.9.7" PrivateAssets="All" />
<PackageReference Include="Meziantou.Analyzer" Version="1.0.688" PrivateAssets="All" />
<PackageReference Include="Meziantou.Analyzer" Version="1.0.695" PrivateAssets="All" />
<PackageReference Include="SecurityCodeScan.VS2019" Version="5.6.0" PrivateAssets="All" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="All" />
<PackageReference Include="SonarAnalyzer.CSharp" Version="8.34.0.42011" PrivateAssets="All" />
<PackageReference Include="SonarAnalyzer.CSharp" Version="8.36.0.43782" PrivateAssets="All" />
</ItemGroup>

</Project>
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ This repository contains packages with components for Blazor application:
|---|---|
| Atc.Blazor.ColorThemePreference | A library for detecting the user preferred color theme |

## Get started Atc.Blazor.ColorThemePreference

### Requirements

* [.NET 6 Runtime](https://dotnet.microsoft.com/en-us/download/dotnet/6.0)
Expand All @@ -21,6 +23,7 @@ Install-Package Atc.Blazor.ColorThemePreference
### How to Setup

Modify `Program.cs` by adding to the service builder:

```csharp
var builder = WebAssemblyHostBuilder.CreateDefault(args);
builder.RootComponents.Add<App>("#app");
Expand All @@ -34,8 +37,9 @@ await builder.Build().RunAsync();
```

Modify `index.html` by adding:

```html
<script src="_content/Atc.Blazor.ColorThemePreference/ColorThemePreferenceDetector.js"></script>
<script src="_content/Atc.Blazor.ColorThemePreference/ColorThemePreferenceDetector.js" type="module"></script>
```

### How to Use
Expand Down
7 changes: 4 additions & 3 deletions sample/.editorconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# ATC coding rules - https://github.com/atc-net/atc-coding-rules
# Version: 1.0.0
# Updated: 04-12-2020
# Location: Sample
# Version: 1.0.9
# Updated: 01-02-2022
# Location: sample
# Distribution: DotNet6
# Inspired by: https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/code-style-rule-options

##########################################
Expand Down
4 changes: 2 additions & 2 deletions sample/Atc.Blazor.Sample/Atc.Blazor.Sample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.1" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.2" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.2" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down
32 changes: 16 additions & 16 deletions sample/Atc.Blazor.Sample/wwwroot/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,25 @@
<html lang="en">

<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>Atc.Blazor.Sample</title>
<base href="/" />
<link href="css/bootstrap/bootstrap.min.css" rel="stylesheet" />
<link href="css/app.css" rel="stylesheet" />
<link href="Atc.Blazor.Sample.styles.css" rel="stylesheet" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>Atc.Blazor.Sample</title>
<base href="/" />
<link href="css/bootstrap/bootstrap.min.css" rel="stylesheet" />
<link href="css/app.css" rel="stylesheet" />
<link href="Atc.Blazor.Sample.styles.css" rel="stylesheet" />
</head>

<body>
<div id="app">Loading...</div>
<div id="app">Loading...</div>

<div id="blazor-error-ui">
An unhandled error has occurred.
<a href="" class="reload">Reload</a>
<a class="dismiss">🗙</a>
</div>
<script src="_framework/blazor.webassembly.js"></script>
<script src="_content/Atc.Blazor.ColorThemePreference/scripts/ColorThemePreferenceDetector.js"></script>
<div id="blazor-error-ui">
An unhandled error has occurred.
<a href="" class="reload">Reload</a>
<a class="dismiss">🗙</a>
</div>
<script src="_framework/blazor.webassembly.js"></script>
<script src="_content/Atc.Blazor.ColorThemePreference/ColorThemePreferenceDetector.js" type="module"></script>
</body>

</html>
</html>
7 changes: 4 additions & 3 deletions src/.editorconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# ATC coding rules - https://github.com/atc-net/atc-coding-rules
# Version: 1.0.5
# Updated: 02-05-2021
# Location: Src
# Version: 1.0.9
# Updated: 01-02-2022
# Location: src
# Distribution: DotNet6
# Inspired by: https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/code-style-rule-options

##########################################
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.0.2" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public ColorThemePreferenceDetector(IJSRuntime jsRuntime)
moduleTask = new Lazy<Task<IJSObjectReference>>(() => jsRuntime
.InvokeAsync<IJSObjectReference>(
"import",
"./_content/Atc.Blazor.ColorThemePreference/scripts/ColorThemePreferenceDetector.js")
"./_content/Atc.Blazor.ColorThemePreference/ColorThemePreferenceDetector.js")
.AsTask());
}

Expand Down
8 changes: 5 additions & 3 deletions test/.editorconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# ATC coding rules - https://github.com/atc-net/atc-coding-rules
# Version: 1.0.7
# Updated: 18-06-2021
# Location: Test
# Version: 1.0.9
# Updated: 01-02-2022
# Location: test
# Distribution: DotNet6
# Inspired by: https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/code-style-rule-options

##########################################
Expand Down Expand Up @@ -50,4 +51,5 @@ dotnet_diagnostic.SA1133.severity = none # https://github.com/atc-net

##########################################
# Custom - Code Analyzers Rules
##########################################
########################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################
2 changes: 1 addition & 1 deletion test/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Atc.Test" Version="1.0.45" />
<PackageReference Include="Atc.Test" Version="1.0.58" />
<PackageReference Include="NSubstitute.Analyzers.CSharp" Version="1.0.15" PrivateAssets="All" />
</ItemGroup>

Expand Down

0 comments on commit 6a06b16

Please sign in to comment.