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 |
- Clone the repository
- Install the pre-commit hooks by running
pre-commit install
- Install dependencies by running
deno install
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
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.
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"
...
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.