Last active
December 7, 2022 18:47
-
-
Save mcansh/ec38261fd0356ba050b9c10f1ed78c61 to your computer and use it in GitHub Desktop.
install, build, and type-check all `remix-run/examples`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function install() { | |
packageManager="yarn install --silent" | |
if test -f "package-lock.json"; then | |
echo "package-lock.json found, using npm" | |
packageManager="npm install --legacy-peer-deps --silent" | |
elif test -f "pnpm-lock.yaml"; then | |
echo "yarn.lock found, using yarn" | |
packageManager="pnpm install --reporter=silent" | |
else | |
echo "defaulting to yarn" | |
packageManager="yarn install --silent" | |
fi | |
$packageManager | |
} | |
for dir in ./*/; do | |
cd $dir | |
echo "installing dependencies for $dir" | |
install | |
echo "building $dir" | |
npm run build --if-present | |
echo "typechecking $dir" | |
tsc --skipLibCheck | |
cd ../; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment