Monorepo for Lumina, a dex for the Mina Blockchain.
- Moon is a task runner and monorepo management tool for the web ecosystem, written in Rust.
- Proto is a version manager for all web languages and tools. A unified toolchain.
Tip
Proto is not necessary, but extremely convenient as it take cares of installing the correct version of Moon, Node, pnpm and Bun.
- Install Proto (https://moonrepo.dev/docs/proto/install)
# macOS
brew install git unzip gzip xz
# Ubuntu / Debian
apt-get install git unzip gzip xz-utils
# RHEL-based / Fedora
dnf install git unzip gzip xz
# Linux, macOS, WSL
curl -fsSL https://get.prototools.dev | sh# Windows (PowerShell)
irm https://moonrepo.dev/install/proto.ps1 | iex
Set-ExecutionPolicy RemoteSigned
# Without admin privileges
Set-ExecutionPolicy -Scope CurrentUser RemoteSigned- Install Moon
proto install moon- Use Moon to run tasks from the repo root. All tools and dependencies will be installed automatically.
moon <project>:<task>or within a project:
moon run <task>To find out which tasks are available, look at the moon.yml files in each project folder.
The tasks in the root .moon/tasks.yaml are available to all projects.
- Format entire workspace:
moon run format-all-fix
Here are some useful commands to explore the monorepo structure and tasks.
moon task <task>
moon project <project>
moon query projectsWe use lefthook to manage githooks. It should work out of the box, but after running pnpm i, you should run pnpm lefthook install to ensure it's set up correctly.
- Pull the latest changes from
main.
git switch main && git pull-
Do some work on the
mainbranch. -
Create a new branch for your changes.
git switch -c feature/my-changes- Commit your changes.
git add . && git commit -m "feat: my changes"- Push your changes and create a PR
#Using the github cli this pushes the branch and creates a PR
gh pr create
#Or you can use git and manually create the PR
git push -u origin feature/my-changesWe use changesets to manage releases. Follow the GitHub workflow, and add a changeset to your PR to create a new release.
moon changesetThen merge your PR. Publishing to NPM will be automated with GitHub Actions.
You might need to install dprint globally to get the vscode extension working.
curl -fsSL https://dprint.dev/install.sh | sh