Ctrl K
ComunidadGuías…

scripts/postInstall.sh

Rama main · réplica de lectura del repositorio original.

Archivo original ↗Preguntar a KiBot
#!/bin/bash

# Exit immediately if any command exits with a non-zero status
set -e

# Go to project root
ROOT_DIR=$(dirname "$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)")
cd "$ROOT_DIR" || exit 1

# See if we're in the HybridApp repo
IS_HYBRID_APP_REPO=$(scripts/is-hybrid-app.sh)

# See if we should force standalone NewDot build
NEW_DOT_FLAG="${STANDALONE_NEW_DOT:-false}"

if [[ "$IS_HYBRID_APP_REPO" == "true" && "$NEW_DOT_FLAG" == "false" ]]; then
  echo -e "\n${GREEN}Installing node modules in Mobile-Expensify submodule!${NC}"
  cd Mobile-Expensify || exit 1
  npm i

  cd "$ROOT_DIR" || exit 1
fi

# Setup Skia WASM
echo -e "\n${GREEN}Setting up Skia WASM!${NC}"
./node_modules/.bin/setup-skia-web

# Clean up web/static created by setup-skia-web
rm -rf "$ROOT_DIR/web/static"

# Apply packages using patch-package
bun scripts/applyPatches.ts

# `@typescript/old` (pulled in by `@typescript/typescript6`) also ships a `tsc` bin.
# npm's last-writer-wins linking can point `node_modules/.bin/tsc` at TypeScript 6.
# Force the TypeScript 7 native compiler, so `npx tsc` is the compiler `npm run typecheck` runs.
#
# It is not the same *command*: the root tsconfig.json is a solution that lists projects and owns no
# files, and project mode does not follow `references`. `npx tsc` at the repo root therefore checks
# nothing and exits 0. Use `npx tsc --build`, which walks the references, or `npm run typecheck`.
ln -sfn ../typescript/bin/tsc "$ROOT_DIR/node_modules/.bin/tsc"

# Keep the Worker independently installable for deploy CI, but include it in normal local App setup.
bun scripts/installCloudflareWorker.ts