Files
zshrc/scripts/bin/deploy-npm
T
2022-12-20 16:20:41 -05:00

14 lines
306 B
Bash
Executable File

#!/usr/bin/env bash
# Stop on error
set -e
# Check if package.json is present
[[ ! -f "package.json" ]] && echo "package.json not found, please make sure you're in the correct path" && exit -1
# Build
[[ -f "yarn.lock" ]] && yarn build
[[ -f "package-lock.json" ]] && npm build
# Deploy npm
npm publish