Skip to content

Latest commit

 

History

History
78 lines (55 loc) · 2.4 KB

CONTRIBUTING.md

File metadata and controls

78 lines (55 loc) · 2.4 KB

Contributing

Repository

The repository exports the Mage Server package. The exports are outlined in mod.ts.

Directory Description
.git-hooks pre-commit git hooks
.github GitHub Actions workflows
.vscode Common VSCode settings
src Source code
test-utils Test utilities
tests Tests for the source code

Development

Requirements

Setup

  1. Clone the repository
  2. Install the pre-commit hooks by running pre-commit install
  3. Install dependencies by running deno install

Testing

The core philosophy of the Mage Server is to be test-driven. The tests are written in the tests directory. In general favour writing tests against a running server.

Run the tests with the following command:

deno task test

Running development server

When making changes to the server in the src directory, it is recommended to run the server locally to test the changes.

Run the server with the following command:

deno task dev

The server will run on http://0.0.0.0:8000 or the next available port. It will automatically restart on changes.

Committing changes

Ensure you have the pre-commit hooks installed. These run in CI on the server so you won't be able to merge if they aren't run but they're extremely fast and will save you time.

When committing changes, loosely follow the Conventional Commits specification. Pull request titles are linted to be conventional commit format and are then used as the commit message upon squash merging.

git commit -m "feat: add new feature"
git commit -m "fix: resolve issue"
git commit -m "docs: update documentation"
...

Releasing

Releases are automatically created when a pull request is merged if the version in deno.json is updated. The version should be updated following the Semantic Versioning specification.