Skip to content

Latest commit

 

History

History
79 lines (56 loc) · 3.66 KB

CONTRIBUTING.md

File metadata and controls

79 lines (56 loc) · 3.66 KB

Contributing to Hex Engine

First off, thank you for your interest in contributing to Hex Engine!

The following is a set of guidelines for contributing. These are guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.

Table Of Contents

Code of Conduct

By contributing to Hex Engine in any way, you pledge to uphold the standards listed in the Contributor Covenant Code of Conduct Version 2.0.

Note that "in any way" includes, but is not limited to:

  • Opening Pull Requests
  • Opening Issues
  • Commenting on Pull Requests or Issues
  • Posting messages to the official Hex Engine Discord server

How to contribute

Hex Engine greatly appreciates pull requests, but open an issue first to check if the change you want to make is in line with the project vision. Once you have, you can follow these instructions to clone the repo and work on it locally.

Install the project

First, you need to fork the repository. For information about forking a repository, you can check this GitHub help page.

Once you have forked the repo, use the following command to clone it onto your local machine (replacing <your-github-user-name> with your GitHub username).

git clone https://github.com/<your-github-user-name>/hex-engine.git

Afterwards, cd into the newly-created hex-engine folder, and install the dependencies. You can install the dependencies with this command:

npm install

Now you can run the Hex Engine project with the following command:

npm start

Project Structure

This project is separated as multiple packages which you can find in the packages folder.

Folder Description
2d Provides primitives for making a 2D game. This is published on npm as @hex-engine/2d.
core Core Entity and Component system. This is published on npm as @hex-engine/core.
create CLI to create a boilerplate project. This is published on npm as create-hex-engine-game.
game Example game built with with Hex Engine. This is not published on npm.
inspector The debugging inspector that is included with Hex Engine. This is published on npm as @hex-engine/inspector.
scripts The hex-engine-scripts package, which is used to compile your game.
website Hex Engine's website (https://hex-engine.dev).

package.json script reference

Command Function
npm start Builds all packages, watches them for changes, and rebuilds on change. Also, runs the sample game at port 8080, and the website at port 3000.
npm run watch Same as npm start.
npm run clean Cleans all package build artifacts.
npm run build Builds all packages in a way that is suitable for production distribution.
npm run typecheck Runs TypeScript across the repo.
npm run test-it Runs Test-It on the repo.
npm test Runs npm run typecheck and then npm run test-it.
npm run build-website Builds the website. The website is also built as part of npm run build, but this builds only the website. This script is used to deploy the website.