Add .editorconfig and remove now-excluded files

pull/4/head
Kirk Larkin 2022-04-01 11:14:07 +01:00
parent cbfed00819
commit 7cf401f7e5
10 changed files with 21 additions and 139 deletions

17
.editorconfig 100644
View File

@ -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

1
.gitattributes vendored 100644
View File

@ -0,0 +1 @@
* text=auto eol=lf

View File

@ -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"
});

View File

@ -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"
}
}
}
}

View File

@ -7,7 +7,7 @@
</PropertyGroup>
<ItemGroup>
<Content Remove="wwwroot\**" />
<Content Remove="wwwroot\**" />
</ItemGroup>
<ItemGroup>

View File

@ -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

View File

@ -30,7 +30,7 @@ document.addEventListener("DOMContentLoaded", () => {
console.log(err);
setTimeout(start, 5000);
}
};
}
connection.onclose(async () => {
await start();

View File

@ -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"
}
}
}
}

View File

@ -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

View File

@ -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 = "<div class=\"message-author\">".concat(username, "</div><div>").concat(message, "</div>");
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 = ""); });
}