From d19ae9ac5fc51ff98ed214441f41c7c76ccca89f Mon Sep 17 00:00:00 2001 From: Derek Holloway Date: Tue, 17 Jun 2025 20:28:06 -0700 Subject: [PATCH] Get VScode build system working --- .gitignore | 9 +- .vscode/launch.json | 25 +++ .vscode/tasks.json | 34 ++++ new-env.sh | 4 + src/MistoxWebsite.Client/.gitmodules | 0 src/MistoxWebsite.Client/angular.json | 11 +- src/MistoxWebsite.Client/tsconfig.json | 3 +- .../MistoxWebsite.Server.csproj | 6 + src/MistoxWebsite.Server/wwwroot/css/app.css | 178 ------------------ .../wwwroot/js/screenwidth.js | 6 - 10 files changed, 81 insertions(+), 195 deletions(-) create mode 100644 .vscode/launch.json create mode 100644 .vscode/tasks.json create mode 100755 new-env.sh delete mode 100644 src/MistoxWebsite.Client/.gitmodules delete mode 100755 src/MistoxWebsite.Server/wwwroot/css/app.css delete mode 100755 src/MistoxWebsite.Server/wwwroot/js/screenwidth.js diff --git a/.gitignore b/.gitignore index c2dce26..1d52134 100755 --- a/.gitignore +++ b/.gitignore @@ -7,14 +7,16 @@ /bazel-out # Node -/node_modules +node_modules /resources npm-debug.log yarn-error.log +.angular # DotNet **/bin **/obj +/debug # IDEs and editors .idea/ @@ -26,11 +28,6 @@ yarn-error.log *.sublime-workspace # Visual Studio Code -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json .history/* # Miscellaneous diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..8ff96e9 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,25 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Launch ASP.NET Core backend", + "type": "coreclr", + "request": "launch", + "preLaunchTask": "build-all", + "program": "${workspaceFolder}/debug/MistoxWebsite.Server.dll", + "args": [], + "cwd": "${workspaceFolder}", + "stopAtEntry": false, + "serverReadyAction": { + "action": "openExternally", + "pattern": "\\bNow listening on:\\s+(https?://\\S+)" + }, + "env": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "sourceFileMap": { + "/Views": "${workspaceFolder}/Views" + } + } + ] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..15db470 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,34 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "server-build", + "command": "dotnet", + "type": "process", + "args": [ + "build", + "${workspaceFolder}/src/MistoxWebsite.Server/MistoxWebsite.Server.csproj", + "-o", + "${workspaceFolder}/debug/" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "client-build", + "command": "ng", + "type": "process", + "options": { + "cwd": "${workspaceFolder}/src/MistoxWebsite.Client" + }, + "args": [ + "build" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "build-all", + "dependsOn": ["client-build", "server-build" ], + "dependsOrder": "sequence" + } + ] +} \ No newline at end of file diff --git a/new-env.sh b/new-env.sh new file mode 100755 index 0000000..2d949ef --- /dev/null +++ b/new-env.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +cd ./src/MistoxWebsite.Client/ +npm install \ No newline at end of file diff --git a/src/MistoxWebsite.Client/.gitmodules b/src/MistoxWebsite.Client/.gitmodules deleted file mode 100644 index e69de29..0000000 diff --git a/src/MistoxWebsite.Client/angular.json b/src/MistoxWebsite.Client/angular.json index f04c7ab..776888c 100644 --- a/src/MistoxWebsite.Client/angular.json +++ b/src/MistoxWebsite.Client/angular.json @@ -14,9 +14,7 @@ "builder": "@angular/build:application", "options": { "browser": "src/main.ts", - "polyfills": [ - "zone.js" - ], + "polyfills": ["zone.js" ], "tsConfig": "tsconfig.app.json", "assets": [ { @@ -27,7 +25,12 @@ "styles": [ "src/styles.css" ], - "outputPath": "resources/static" + "aot": true, + "outputMode": "static", + "outputPath": { + "base": "../MistoxWebsite.Server/wwwroot", + "browser": "" + } }, "configurations": { "production": { diff --git a/src/MistoxWebsite.Client/tsconfig.json b/src/MistoxWebsite.Client/tsconfig.json index e4955f2..88f49f5 100644 --- a/src/MistoxWebsite.Client/tsconfig.json +++ b/src/MistoxWebsite.Client/tsconfig.json @@ -13,7 +13,8 @@ "experimentalDecorators": true, "importHelpers": true, "target": "ES2022", - "module": "preserve" + "module": "preserve", + "baseUrl": "src", }, "angularCompilerOptions": { "enableI18nLegacyMessageIdFormat": false, diff --git a/src/MistoxWebsite.Server/MistoxWebsite.Server.csproj b/src/MistoxWebsite.Server/MistoxWebsite.Server.csproj index 7a93aed..621ce3d 100755 --- a/src/MistoxWebsite.Server/MistoxWebsite.Server.csproj +++ b/src/MistoxWebsite.Server/MistoxWebsite.Server.csproj @@ -18,4 +18,10 @@ + + + PreserveNewest + + + diff --git a/src/MistoxWebsite.Server/wwwroot/css/app.css b/src/MistoxWebsite.Server/wwwroot/css/app.css deleted file mode 100755 index eacfdce..0000000 --- a/src/MistoxWebsite.Server/wwwroot/css/app.css +++ /dev/null @@ -1,178 +0,0 @@ -:root { - --Mistox-Dark: #2C0703; - --Mistox-Medium: #890620; - --Mistox-Light: #B6465F; - --Mistox-Bright: #FC440F; - --Mistox-Offset: #443B75; - --Mistox-Background: #320000; - --Mistox-White: #FFF; - --Mistox-Black: #000; -} - -html, body { - font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; -} - -main { - background-color: #000000; - background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cg fill-rule='evenodd'%3E%3Cg id='hexagons' fill='%23ff0000' fill-opacity='0.2' fill-rule='nonzero'%3E%3Cpath d='M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.35V17.9l-11-6.34L3 17.9zM0 15l12.98-7.5V0h-2v6.35L0 12.69v2.3zm0 18.5L12.98 41v8h-2v-6.85L0 35.81v-2.3zM15 0v7.5L27.99 15H28v-2.31h-.01L17 6.35V0h-2zm0 49v-8l12.99-7.5H28v2.31h-.01L17 42.15V49h-2z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); -} - -#blazor-error-ui { - background: lightyellow; - bottom: 0; - box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); - display: none; - left: 0; - padding: 0.6rem 1.25rem 0.7rem 1.25rem; - position: fixed; - width: 100%; - z-index: 1000; -} - - #blazor-error-ui .dismiss { - cursor: pointer; - position: absolute; - right: 0.75rem; - top: 0.5rem; - } - -.blazor-error-boundary { - background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121; - padding: 1rem 1rem 1rem 3.7rem; - color: white; -} - - .blazor-error-boundary::after { - content: "An error has occurred." - } - -/* CSS used for the Account Activity Pages */ - -.center { - position: relative; - left: 50%; - top: 50vh; - transform: translateY(-50%) translateX(-50%); -} - -.horizontal-center { - position: relative; - left: 50%; - transform: translateX(-50%); -} - -.vertical-center { - position: relative; - top: 50vh; - transform: translateY(-50%); -} - -.background-border { - border: var(--Mistox-Background) 2px solid; - border-radius: 6px; -} - -.big-frame { - background-color: var(--Mistox-Black); - padding: 4px; - max-width: 400px; - color: var(--Mistox-White); - transition-duration: 1s; -} - -.big-frame h3{ - margin: 15px 0 30px 0; - color: var(--Mistox-White); - text-align: center; -} - -.big-frame h2{ - text-align: center; - position: relative; - margin: 0; - top: -20px; - font-size: 15px; - color: var(--Mistox-Bright); -} - -.big-frame .frame-item label{ - position: relative; - padding: 10px 0; - font-size: 16px; - color: var(--Mistox-White); - pointer-events: none; - transition: .5s; - top: -70px; - left: 20px; -} - - .big-frame .frame-item input:autofill, - .big-frame .frame-item input:-webkit-autofill, - .big-frame .frame-item input { - position: relative; - width: calc(100% - 40px); - margin: 0 20px; - padding: 10px 0; - font-size: 15px; - color: var(--Mistox-White); - margin-bottom: 30px; - border: none; - border-bottom: 1px solid var(--Mistox-White); - outline: none; - background: transparent; - } - - .big-frame .frame-item input:focus ~ label, - .big-frame .frame-item input:not(:placeholder-shown) ~ label { - top: -95px; - left: 10px; - color: var(--Mistox-Light); - font-size: 12px; - } - -.flex-row{ - display: flex; - flex-direction: row; - justify-content: space-around; -} - -.sub-frame { - text-align: center; - padding: 1px 0; -} - -.submit{ - position: relative; - padding: 10px 20px; - color: var(--Mistox-Black); - background-color: var(--Mistox-Light); - font-size: 16px; - text-decoration: none; - text-transform: uppercase; - overflow: hidden; - transition: transform 0.3s ease, box-shadow 0.5s ease; - letter-spacing: 4px; - border: 1px solid var(--Mistox-Light); - margin: auto; - border-radius: 5px; -} - - .submit:hover { - background-color: var(--Mistox-Light); - color: var(--Mistox-White); - box-shadow: 4px 3px 6px var(--Mistox-Dark); - } - - .submit:active { - transform: translate( 4px, 2px ); - background-color: var(--Mistox-Dark); - border: none; - color: var(--Mistox-White); - box-shadow: none; - } - -ul { - list-style: none; - color: var(--Mistox-Bright); -} \ No newline at end of file diff --git a/src/MistoxWebsite.Server/wwwroot/js/screenwidth.js b/src/MistoxWebsite.Server/wwwroot/js/screenwidth.js deleted file mode 100755 index 180e127..0000000 --- a/src/MistoxWebsite.Server/wwwroot/js/screenwidth.js +++ /dev/null @@ -1,6 +0,0 @@ -window.getWindowSize = function() { - return { - width: window.innerWidth, - height: window.innerHeight - }; -}; \ No newline at end of file