Developer Guide
This page describes how to setup the project on your computer for local development. This guide should work on all major operating systems (Windows, Linux, or macOS).
Develop in GitPod
The easiest way to code on this project is to use GitPod, which lets you develop Bemuse in a cloud-based environment where all the dependencies are already installed from your web browser.
You can launch a workspace by going to the below link:
→ https://gitpod.io/#https://github.com/bemusic/bemuse
Develop in GitHub Codespaces
You can also develop Bemuse in GitHub Codespaces, which is a cloud-based development environment that is integrated with GitHub.
You can launch a workspace by going to the below link:
→ https://github.com/codespaces/new?hide_repo_select=true&repo=27105154&machine=standardLinux32gb
It will take about 4 minutes to launch the workspace. Once it is ready, you can start the development server by running the following command:
$ rush dev
Manual Setup
Windows, macOS and Linux
- Git
- Node.js (v16.18.0+)
- Text Editor with EditorConfig & Prettier support. (We recommend Visual Studio Code)
Prerequisite Check
Run these commands inside the Terminal (PowerShell/Command Prompt for Windows).
Git: You should see the version number:
$ git --version
git version 2.17.0
Node.js: You should see the version number:
$ node -v
v16.18.0
Install Rush
We use Rush to manage the dependencies of this project, so we first need to install it.
$ npm install -g @microsoft/rush
Setting Up the Project
First, you should create a folder for Bemuse development:
$ mkdir Bemuse
$ cd Bemuse
Then, clone the Bemuse repository:
$ git clone https://github.com/bemusic/bemuse.git
After these repository has been cloned, cd
into the Bemuse repository:
$ cd bemuse
Install the project's dependencies using Rush:
$ rush update
Before running the development server, you will have to compile the subprojects that Bemuse depends on:
$ rush build --to-except bemuse
Running Bemuse
After everything is installed and all subprojects have been compiled, you can start the development server:
$ rush dev
The game should be accessible at http://localhost:8080/
.
To run unit tests, go to http://localhost:8080/?mode=test
.
Building Bemuse
To build the source code into a static web application, run:
$ node build-scripts build
The built files will reside in the dist
directory.
Working on the project website
$ cd website
$ npm start