Skip to content

Instantly share code, notes, and snippets.

@mcansh
Last active December 7, 2022 18:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mcansh/ec38261fd0356ba050b9c10f1ed78c61 to your computer and use it in GitHub Desktop.
Save mcansh/ec38261fd0356ba050b9c10f1ed78c61 to your computer and use it in GitHub Desktop.
install, build, and type-check all `remix-run/examples`
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