From 7cf401f7e5e21039ea231193e8de76799bd9c158 Mon Sep 17 00:00:00 2001
From: Kirk Larkin <6025110+serpent5@users.noreply.github.com>
Date: Fri, 1 Apr 2022 11:14:07 +0100
Subject: [PATCH] Add .editorconfig and remove now-excluded files
---
.editorconfig | 17 +++++++++++
.gitattributes | 1 +
fundamentals/static-files/WebRoot/Program.cs | 2 +-
.../WebRoot/Properties/launchSettings.json | 30 -------------------
.../static-files/WebRoot/WebRoot.csproj | 2 +-
fundamentals/static-files/WebRoot/WebRoot.sln | 25 ----------------
.../6.x/SignalRHubsSample/wwwroot/chat.js | 2 +-
.../Properties/launchSettings.json | 28 -----------------
.../6.x/SignalRWebpack/SignalRWebpack.sln | 25 ----------------
.../samples/6.x/SignalRWebpack/src/index.js | 28 -----------------
10 files changed, 21 insertions(+), 139 deletions(-)
create mode 100644 .editorconfig
create mode 100644 .gitattributes
delete mode 100644 fundamentals/static-files/WebRoot/Properties/launchSettings.json
delete mode 100644 fundamentals/static-files/WebRoot/WebRoot.sln
delete mode 100644 tutorials/signalr-typescript-webpack/samples/6.x/SignalRWebpack/Properties/launchSettings.json
delete mode 100644 tutorials/signalr-typescript-webpack/samples/6.x/SignalRWebpack/SignalRWebpack.sln
delete mode 100644 tutorials/signalr-typescript-webpack/samples/6.x/SignalRWebpack/src/index.js
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..de0e8f1
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,17 @@
+root = true
+
+[*]
+charset = utf-8
+end_of_line = crlf
+indent_size = 2
+indent_style = space
+insert_final_newline = true
+
+[*.{cs,cshtml,html,razor}]
+indent_size = 4
+
+[*.cs]
+dotnet_sort_system_directives_first = true
+
+[*.md]
+max_line_length = off
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..6313b56
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+* text=auto eol=lf
diff --git a/fundamentals/static-files/WebRoot/Program.cs b/fundamentals/static-files/WebRoot/Program.cs
index 9877e54..565c570 100644
--- a/fundamentals/static-files/WebRoot/Program.cs
+++ b/fundamentals/static-files/WebRoot/Program.cs
@@ -2,7 +2,7 @@ var builder = WebApplication.CreateBuilder(new WebApplicationOptions
{
Args = args,
// Examine Hosting environment: logging value
- EnvironmentName = Environments.Staging,
+ EnvironmentName = Environments.Staging,
// Look for static files in "wwwroot-custom"
WebRootPath = "wwwroot-custom"
});
diff --git a/fundamentals/static-files/WebRoot/Properties/launchSettings.json b/fundamentals/static-files/WebRoot/Properties/launchSettings.json
deleted file mode 100644
index 6cbc476..0000000
--- a/fundamentals/static-files/WebRoot/Properties/launchSettings.json
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "iisSettings": {
- "windowsAuthentication": false,
- "anonymousAuthentication": true,
- "iisExpress": {
- "applicationUrl": "http://localhost:2483",
- "sslPort": 44302
- }
- },
- "profiles": {
- "WebRoot": {
- "commandName": "Project",
- "dotnetRunMessages": true,
- "launchBrowser": true,
- "applicationUrl": "https://localhost:7006;http://localhost:5006",
- "environmentVariables": {
- "ASPNETCORE_ENVIRONMENT": "Development"
- //,"ASPNETCORE_ENVIRONMENT": "Production"
- }
- },
- "IIS Express": {
- "commandName": "IISExpress",
- "launchBrowser": true,
- "environmentVariables": {
- "ASPNETCORE_ENVIRONMENT": "Development"
- //,"ASPNETCORE_ENVIRONMENT": "Production"
- }
- }
- }
-}
diff --git a/fundamentals/static-files/WebRoot/WebRoot.csproj b/fundamentals/static-files/WebRoot/WebRoot.csproj
index cae4bd2..c71b147 100644
--- a/fundamentals/static-files/WebRoot/WebRoot.csproj
+++ b/fundamentals/static-files/WebRoot/WebRoot.csproj
@@ -7,7 +7,7 @@
-
+
diff --git a/fundamentals/static-files/WebRoot/WebRoot.sln b/fundamentals/static-files/WebRoot/WebRoot.sln
deleted file mode 100644
index 93ed95c..0000000
--- a/fundamentals/static-files/WebRoot/WebRoot.sln
+++ /dev/null
@@ -1,25 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.1.32228.430
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebRoot", "WebRoot.csproj", "{E2E98526-6D6C-4A2A-861A-93F288983C4F}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {E2E98526-6D6C-4A2A-861A-93F288983C4F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {E2E98526-6D6C-4A2A-861A-93F288983C4F}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {E2E98526-6D6C-4A2A-861A-93F288983C4F}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {E2E98526-6D6C-4A2A-861A-93F288983C4F}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {EFCDA9A5-B0F5-49E0-B732-19C61C4BFC13}
- EndGlobalSection
-EndGlobal
diff --git a/signalr/hubs/samples/6.x/SignalRHubsSample/wwwroot/chat.js b/signalr/hubs/samples/6.x/SignalRHubsSample/wwwroot/chat.js
index d1afa0e..54615a4 100644
--- a/signalr/hubs/samples/6.x/SignalRHubsSample/wwwroot/chat.js
+++ b/signalr/hubs/samples/6.x/SignalRHubsSample/wwwroot/chat.js
@@ -30,7 +30,7 @@ document.addEventListener("DOMContentLoaded", () => {
console.log(err);
setTimeout(start, 5000);
}
- };
+ }
connection.onclose(async () => {
await start();
diff --git a/tutorials/signalr-typescript-webpack/samples/6.x/SignalRWebpack/Properties/launchSettings.json b/tutorials/signalr-typescript-webpack/samples/6.x/SignalRWebpack/Properties/launchSettings.json
deleted file mode 100644
index 81843a7..0000000
--- a/tutorials/signalr-typescript-webpack/samples/6.x/SignalRWebpack/Properties/launchSettings.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "iisSettings": {
- "windowsAuthentication": false,
- "anonymousAuthentication": true,
- "iisExpress": {
- "applicationUrl": "http://localhost:19614",
- "sslPort": 44392
- }
- },
- "profiles": {
- "SignalRWebpack": {
- "commandName": "Project",
- "dotnetRunMessages": true,
- "launchBrowser": true,
- "applicationUrl": "https://localhost:7268;http://localhost:5042",
- "environmentVariables": {
- "ASPNETCORE_ENVIRONMENT": "Development"
- }
- },
- "IIS Express": {
- "commandName": "IISExpress",
- "launchBrowser": true,
- "environmentVariables": {
- "ASPNETCORE_ENVIRONMENT": "Development"
- }
- }
- }
-}
diff --git a/tutorials/signalr-typescript-webpack/samples/6.x/SignalRWebpack/SignalRWebpack.sln b/tutorials/signalr-typescript-webpack/samples/6.x/SignalRWebpack/SignalRWebpack.sln
deleted file mode 100644
index dddf130..0000000
--- a/tutorials/signalr-typescript-webpack/samples/6.x/SignalRWebpack/SignalRWebpack.sln
+++ /dev/null
@@ -1,25 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.1.32228.430
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SignalRWebpack", "SignalRWebpack.csproj", "{6B723BC1-D66A-4C1B-A57F-0E80BF68E46E}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {6B723BC1-D66A-4C1B-A57F-0E80BF68E46E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {6B723BC1-D66A-4C1B-A57F-0E80BF68E46E}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {6B723BC1-D66A-4C1B-A57F-0E80BF68E46E}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {6B723BC1-D66A-4C1B-A57F-0E80BF68E46E}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {38BAA5C6-7745-47DD-AE34-F5427256F76F}
- EndGlobalSection
-EndGlobal
diff --git a/tutorials/signalr-typescript-webpack/samples/6.x/SignalRWebpack/src/index.js b/tutorials/signalr-typescript-webpack/samples/6.x/SignalRWebpack/src/index.js
deleted file mode 100644
index 65ce5b3..0000000
--- a/tutorials/signalr-typescript-webpack/samples/6.x/SignalRWebpack/src/index.js
+++ /dev/null
@@ -1,28 +0,0 @@
-"use strict";
-Object.defineProperty(exports, "__esModule", { value: true });
-var signalR = require("@microsoft/signalr");
-require("./css/main.css");
-var divMessages = document.querySelector("#divMessages");
-var tbMessage = document.querySelector("#tbMessage");
-var btnSend = document.querySelector("#btnSend");
-var username = new Date().getTime();
-var connection = new signalR.HubConnectionBuilder()
- .withUrl("/hub")
- .build();
-connection.on("messageReceived", function (username, message) {
- var m = document.createElement("div");
- m.innerHTML = "".concat(username, "
").concat(message, "
");
- divMessages.appendChild(m);
- divMessages.scrollTop = divMessages.scrollHeight;
-});
-connection.start().catch(function (err) { return document.write(err); });
-tbMessage.addEventListener("keyup", function (e) {
- if (e.key === "Enter") {
- send();
- }
-});
-btnSend.addEventListener("click", send);
-function send() {
- connection.send("newMessage", username, tbMessage.value)
- .then(function () { return (tbMessage.value = ""); });
-}