This is my personal website, where I add posts about varied stuff. It is developed in Scala.js and hosted with Firebase Hosting.
Attention with the Java version in use. Java 17 and 20 have allowed SBT 1.8 to launch fine, whereas 21 or 22 have not until I updated to SBT 1.10. So make sure to have an SBT version that is compatible with the JDK in use, and make sure that JDK is compatible with the Scala version of the project.
Launch SBT with the provided script sbt.sh for more memory.
In SBT:
test
Note: sbt-scoverage is not configured for this project as it only
supports Scala 2 for Scala.js at the time of writing (8 Aug 2024).
In SBT:
~fastLinkJS
In another terminal, execute dev_local.sh, which essentially does:
./prep_public.sh public
npm run dev
These are the steps to build the final (optimised) version of the website for testing before deployment to Firebase
Hosting (ie, Vite preview). For deployment per-se, they are not necessary, as everything is automated in script
deploy.sh.
In SBT:
~fullLinkJS
In another terminal:
./prep_public.sh public <-- must be before `npm run build`, as that
npm run build <-- places `public` artifacts in `dist`
npm run preview
Note: Access to the database and the word cloud will not work in the preview.
Have the JSON key file path of a Firebase service account pointed by an env var GOOGLE_APPLICATION_CREDENTIALS and:
./deploy.sh