From cc13994f675c95fea217ac03953de00b1f13b7a4 Mon Sep 17 00:00:00 2001 From: Connor Sullivan Date: Sun, 28 Jul 2024 19:28:26 -0400 Subject: [PATCH] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20Upgrade=20connorjs-analyze?= =?UTF-8?q?rs=20(#5)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Upgrades `connorjs-analyzers` and reorganizes properties. Adds CSharpier, applies formatting, and documents targets mindset. --- README.md | 12 ++++++++ server/Directory.Build.props | 36 +++++++---------------- server/Directory.Packages.props | 5 ++-- server/hello-cs-test/hello-cs-test.csproj | 2 +- server/hello-cs/HelloUtility.cs | 5 +++- server/hello-cs/hello-cs.csproj | 6 ++-- 6 files changed, 33 insertions(+), 33 deletions(-) diff --git a/README.md b/README.md index bd47f90..83710e7 100644 --- a/README.md +++ b/README.md @@ -14,3 +14,15 @@ Most other configuration files live in the root directory. The solution view offers an alternative display of the workspace. It reorganizes the root configuration files into `client`, `server`, and `shared` under the `files` solution folder. It groups all projects together under the `projects` solution folder (no `client` and `server` separation). + +## Targets + +The workspace uses the standard `dotnet` targets for both .NET and npm. + +- `restore` installs dependencies +- `build` compiles, lints, and builds the projects +- `test` runs unit tests with coverage + +.NET uses `build` for Analyzers and formatting (via `CSharpier.MSBuild`), so npm uses `build` for ESLint, tsc, and Prettier. + +`dotnet format` exists to help auto-fix, but is not used to verify the build. diff --git a/server/Directory.Build.props b/server/Directory.Build.props index 4ba301d..ec66d98 100644 --- a/server/Directory.Build.props +++ b/server/Directory.Build.props @@ -1,46 +1,30 @@ - - + + $(MSBuildProjectName.EndsWith('test')) + $(WorkspaceRoot)artifacts - - - - net8.0 false - - - true - - - disable - - - - - enable - - - true - - - - + + --coverage --coverage-output $(MSBuildProjectName).cobertura.xml --coverage-settings $(WorkspaceRoot)coverage.runsettings --results-directory $(WorkspaceRoot)coverage - - + + + + + diff --git a/server/Directory.Packages.props b/server/Directory.Packages.props index d215a0f..a6dc462 100644 --- a/server/Directory.Packages.props +++ b/server/Directory.Packages.props @@ -6,6 +6,7 @@ - + + - \ No newline at end of file + diff --git a/server/hello-cs-test/hello-cs-test.csproj b/server/hello-cs-test/hello-cs-test.csproj index b9fc00c..e43f567 100644 --- a/server/hello-cs-test/hello-cs-test.csproj +++ b/server/hello-cs-test/hello-cs-test.csproj @@ -8,6 +8,6 @@ - + diff --git a/server/hello-cs/HelloUtility.cs b/server/hello-cs/HelloUtility.cs index bed668a..dec0d5c 100644 --- a/server/hello-cs/HelloUtility.cs +++ b/server/hello-cs/HelloUtility.cs @@ -1,5 +1,8 @@ -namespace Connorjs.DotNetWithEsprojExample.Hello; +namespace Connorjs.DotNetWithEsprojExample.Hello; +/// +/// Example “Hello, world!” class. +/// public static class HelloUtility { /// diff --git a/server/hello-cs/hello-cs.csproj b/server/hello-cs/hello-cs.csproj index 1b1867b..158ca09 100644 --- a/server/hello-cs/hello-cs.csproj +++ b/server/hello-cs/hello-cs.csproj @@ -1,5 +1,5 @@  - - Connorjs.DotNetWithEsprojExample.Hello - + + Connorjs.DotNetWithEsprojExample.Hello +