commit 6f5f5a58f6d243b848a5b518b4806cc9a40f024e Author: ProfessionalUwU Date: Mon Jun 12 03:07:37 2023 +0200 Initial commit diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..d793869 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,26 @@ +# Remove the line below if you want to inherit .editorconfig settings from higher directories +root = true + +# C# files +[*.cs] + +# Indentation and spacing +indent_size = 4 +indent_style = space +tab_width = 4 + +# Naming Conventions +dotnet_naming_style.camel_case.capitalization = camel_case + +# New line preferences +csharp_new_line_before_open_brace = none +csharp_new_line_before_else = false +csharp_new_line_before_catch = false +csharp_new_line_before_finally = false + +# Wrapping preferences +csharp_preserve_single_line_statements = true +csharp_preserve_single_line_blocks = true + +# Switch case +csharp_indent_case_contents = true \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f73905c --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +.vscode/ +[Oo]bj/ +[Bb]in/ diff --git a/justfile b/justfile new file mode 100644 index 0000000..d66ba9f --- /dev/null +++ b/justfile @@ -0,0 +1,31 @@ +default: + @just --list + +project_name := `printf '%s\n' "${PWD##*/}"` +uppercase_project_name := capitalize(project_name) + +setup: + @dotnet new sln --name {{project_name}} + @mkdir src + @dotnet new classlib -o src/{{uppercase_project_name}} + @dotnet new xunit -o src/{{uppercase_project_name}}.Tests + @dotnet sln add src/{{uppercase_project_name}}/{{uppercase_project_name}}.csproj + @dotnet sln add src/{{uppercase_project_name}}.Tests/{{uppercase_project_name}}.Tests.csproj + @dotnet add src/{{uppercase_project_name}}/{{uppercase_project_name}}.csproj reference src/{{uppercase_project_name}}.Tests/{{uppercase_project_name}}.Tests.csproj + +run: + @dotnet run + +build: + @dotnet build src/{{uppercase_project_name}}/{{project_name}}.csproj + @dotnet build src/{{uppercase_project_name}}.Tests/{{uppercase_project_name}}.Tests.csproj + +publish: format + @dotnet publish --configuration Release src/{{uppercase_project_name}}/{{project_name}}.csproj + +format: + @dotnet format src/{{uppercase_project_name}} + @dotnet format src/{{uppercase_project_name}}.Tests + +test: build + @dotnet test src/{{uppercase_project_name}}.Tests