From 6de2ab4cd62c94ab6a1eefbc4876e3197be3e01e Mon Sep 17 00:00:00 2001 From: Zach Butler Date: Fri, 5 Jul 2024 21:25:59 -0400 Subject: [PATCH 1/4] Move serve.sh into scripts folder --- package.json | 2 +- serve.sh => scripts/serve.sh | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename serve.sh => scripts/serve.sh (100%) diff --git a/package.json b/package.json index 78025b3..c10edbc 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", "dev": "vite dev", "preview": "vite preview", - "serve": "./serve.sh" + "serve": "scripts/serve.sh" }, "devDependencies": { "@sveltejs/adapter-auto": "^3.0.0", diff --git a/serve.sh b/scripts/serve.sh similarity index 100% rename from serve.sh rename to scripts/serve.sh From ca2049b61c51d90b914ea31dd2f75cd48714b8a0 Mon Sep 17 00:00:00 2001 From: Zach Butler Date: Fri, 5 Jul 2024 21:27:46 -0400 Subject: [PATCH 2/4] Change purple to cyan --- scripts/serve.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/serve.sh b/scripts/serve.sh index 3af359b..b6cdc6c 100755 --- a/scripts/serve.sh +++ b/scripts/serve.sh @@ -6,7 +6,7 @@ function ee { } echo 'Starting local Caddy web server.' -echo -e '\e[1;35mURL: https://localhost:8443\e[0m' +echo -e '\e[1;36mURL: https://localhost:8443\e[0m' echo -e '\e[1;93mPress [Ctrl] + C to exit...\e[0m' ee "docker run -v \"\$(git rev-parse --show-toplevel):/http\" -w '/http' -p '8443:8443' caddy caddy run --config caddyfile" From f4909e1c4f2739e381bc0485eefaa232acc08df0 Mon Sep 17 00:00:00 2001 From: Zach Butler Date: Fri, 5 Jul 2024 21:31:32 -0400 Subject: [PATCH 3/4] Copy eosnetworkfoundation/aws-cloudwatch-alarm-handler:5b08b42a71b384f765fab7c243aff999fd9bf02e/scripts/reset.sh --- package.json | 1 + scripts/reset.sh | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100755 scripts/reset.sh diff --git a/package.json b/package.json index c10edbc..96d9211 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", "dev": "vite dev", "preview": "vite preview", + "reset": "scripts/reset.sh", "serve": "scripts/serve.sh" }, "devDependencies": { diff --git a/scripts/reset.sh b/scripts/reset.sh new file mode 100755 index 0000000..fea4a77 --- /dev/null +++ b/scripts/reset.sh @@ -0,0 +1,18 @@ +#!/bin/bash +set -eo pipefail + +function ee() +{ + echo "$ $*" + eval "$@" || : +} + +echo 'Resetting nodeJS environment...' +NPM_ROOT="$(npm run env | grep '^PWD' | cut -d '=' -f '2')" +pushd "$NPM_ROOT" +ee 'jest --clearCache' +ee 'rm -r coverage node_modules' +ee 'yarn cache clean' +echo 'nodeJS environment sanitized.' +popd +echo "Done. - ${BASH_SOURCE[0]}" From 433940fd653a7b1e3a29b3161632500c82569d80 Mon Sep 17 00:00:00 2001 From: Zach Butler Date: Fri, 5 Jul 2024 21:36:35 -0400 Subject: [PATCH 4/4] Add Sveltekit-specific paths --- scripts/reset.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/reset.sh b/scripts/reset.sh index fea4a77..1a7d474 100755 --- a/scripts/reset.sh +++ b/scripts/reset.sh @@ -11,7 +11,7 @@ echo 'Resetting nodeJS environment...' NPM_ROOT="$(npm run env | grep '^PWD' | cut -d '=' -f '2')" pushd "$NPM_ROOT" ee 'jest --clearCache' -ee 'rm -r coverage node_modules' +ee 'rm -r build coverage node_modules .svelte-kit' ee 'yarn cache clean' echo 'nodeJS environment sanitized.' popd