diff --git a/package.json b/package.json index 0ed75b3..3aa57b4 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ }, "scripts": { "deploy": "./scripts/deploy.sh", - "prepack": "./scripts/build-release.sh", + "prepack": "./scripts/prepack.sh", "prettier": "prettier --write 'src/**/*.ts' 'src/**/*.tsx'", "lint": "eslint 'src/**/*.ts' 'src/**/*.tsx'", "jest": "./scripts/test-setup.sh && jest --runInBand", diff --git a/scripts/build-release.sh b/scripts/prepack.sh similarity index 90% rename from scripts/build-release.sh rename to scripts/prepack.sh index af30b6a..9a4a7dd 100755 --- a/scripts/build-release.sh +++ b/scripts/prepack.sh @@ -4,12 +4,6 @@ set -euxo pipefail OUTDIR=`pwd`/dist/release -# Typecheck -node_modules/.bin/tsc --noEmit - -# Run unit tests -npm run jest - # Clean out the release directory rm -rf "$OUTDIR" mkdir -p "$OUTDIR" diff --git a/scripts/publish-and-deploy.sh b/scripts/publish-and-deploy.sh index 06aa487..2e431da 100755 --- a/scripts/publish-and-deploy.sh +++ b/scripts/publish-and-deploy.sh @@ -11,6 +11,12 @@ set -euxo pipefail +# Typecheck +node_modules/.bin/tsc --noEmit + +# Run unit tests +npm run jest + if [ $# -lt 1 ]; then echo "Usage: $0 " echo "e.g. $0 patch"