Skip to content

Commit

Permalink
Copy eosnetworkfoundation/aws-cloudwatch-alarm-handler:5b08b42a71b384…
Browse files Browse the repository at this point in the history
…f765fab7c243aff999fd9bf02e/scripts/reset.sh
  • Loading branch information
kj4ezj committed Jul 6, 2024
1 parent ca2049b commit f4909e1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
18 changes: 18 additions & 0 deletions scripts/reset.sh
Original file line number Diff line number Diff line change
@@ -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]}"

0 comments on commit f4909e1

Please sign in to comment.