-
Notifications
You must be signed in to change notification settings - Fork 17
Local development
- Node.js v24 or above. See nodejs.org.
- Git. See git-scm.com or use software such as GitHub Desktop.
- VS Code or another code editor of your choice.
- Fork SkyGame-Planner from GitHub.
- Clone your fork to access the project files locally.
- GitHub Desktop makes this easy, though I personally prefer cloning through VS Code.
- Open the SkyGame-Planner project in your code editor.
- Open a terminal in your code editor and run
npm installto install the required dependencies.
Tip
If you're interested in making changes to the data repository, repeat above steps for SkyGame-Data.
To make sure your project is up to date, periodically follow these steps:
- Fetch and pull the latest changes from the original repository.
- Update your installed version of the
skygame-datapackage by runningnpm install.
- Run
npm run startto start a local development server. - After a short build process, you can access the Sky Planner at http://localhost:4200.
- When changes to the code are saved, the project will automatically rebuild and refresh your browser.
The Sky Planner relies on SkyGame-Data for most of its data.
Running locally will use the data from the npm package skygame-data by default, by using the version as configured in the project's package.json file.
If you want to contribute to SkyGame-Data and verify your changes locally, you can run the proxy version locally.
- In the SkyGame-Data project, run
npm run serveto both listen for changes to the data files and serve an updated version through a local URL. - Instead of starting SkyGame-Planner with
npm run start, usenpm run start-proxy. This will tell the planner to load data from the local URL.- If everything works correctly you can view the raw data at http://localhost:4200/proxy/everything.json
- Whenever you make changes to the data files, make sure to refresh the Sky Planner page to load the updated data.
After setting everything up, starting everything becomes easier.
Using VS Code, you can quickly access the NPM Scripts through the file explorer view.
Now you only need to open SkyGame-Planner and press the Run button next to the start.
For data contributors, open both SkyGame-Planner to run start-proxy and SkyGame-Data to run serve.