This guide assumes you have already installed the following software:
- make (should be installed on all linux / IOS systems)
- golang
>= 1.18
- pnpm >= 8.7.0
- Node.js LTS. You can also pnpm to install Node.js.
- docker desktop (includes: engine, buildkit & compose) or:
- docker engine with:
- docker buildkit, with optionally: docker buildx plugin
- docker compose plugin
NPM packages are managed as a pnpm workspace. This means during development all dependencies are linked.
The root package.json
provides all scripts you need to orchestrate the development workflow.
Most of the project have a .env.example
file. Replace .env.example
with .env
and fill in the required values.
You can bootstrap the repository with the following command:
make
Ready! You can now start contributing to the WunderGraph Cosmo repository. Feel free to open an issue or pull request to add a new feature or fix a bug.
We use conventionalcommits for changelog generation and more structured commit messages.
In order to enforce this standard we use a linter on pre-commit hook. This functionality is provided by husky.
In some setup, you have to tell husky where to find your package manager or binaries. Here is the file .huskyrc
you have to put in your user home directory.
export NVM_DIR=/home/starptech/.nvm
[ -s /home/starptech/.nvm/nvm.sh ] && \. /home/starptech/.nvm/nvm.sh # This loads nvm
# golang
export PATH=$PATH:/usr/local/go/bin
export PATH="$PATH:$(go env GOPATH)/bin"
This plugins simplifies the commit message creation process.
We merge all pull requests in squash merge
mode. You're not enforced to use conventional commit standard across all your commits, but it's a good practice and avoid mistakes. At the end it's important that the squashed commit message follow the standard.