The Tākaro i tētahi kēmu (Play a game) is a website designed to host a number of learning games for early childhood research
MacOS or Linux are recommended for development; consider using WSL if you only have Windows available
- Git
- Node. I recommend installing using NVM and then following these instructions to fix the Husky Git Hooks
This site is built using Jekyll and hosted using Github Pages.
Local development requires Ruby
From the docs
directory;
- Run
bundle install
to install the Ruby dependencies - Run
bundle exec jekyll serve
to run the site locally on localhost - Make changes to the files, commit, push, and confirm the changes on the live site
Games are built using Phaser using TypeScript.
This repository is setup as a monorepo, a single repository containing multiple distinct projects with the ability to share code between.
Pre-requisite tools;
- Run
corepack enable
to ensure thatyarn
is available - Run
yarn install
to resolve dependencies
In the game directory, e.g. ./games/apple-catcher
- Run the game using
yarn dev
- Make changes to the game code under
src
- Verify the changes work locally and as they will be deployed using the developing the Site instructions
- Duplicate the
games/template
directory, with a new name, and- Change the
name
inpackage.json
to match the directory name. - Change the final path segment in the
outDir
in/vite/config.prod.mjs
to match the directory name.
- Change the
- Create a new file
<game-name>.md
in the_games
directory , with the following content
---
heading: <the game name or title e.g A>
subheading: <the game name or title e.g Apple Catcher>
colour: <a CSS colour name for the game icon, from https://developer.mozilla.org/en-US/docs/Web/CSS/named-color, e.g orange>
ref: <the folder name for the game e.g apple-catcher>
---
- Develop and test as per modifying an existing game
Every commit to the main
branch will publish the site to the URL shown in the settings,
using the Github Actions workflows.