Skip to content

Lumina-DEX/lumina

Repository files navigation

Lumina Monorepo

Monorepo for Lumina, a dex for the Mina Blockchain.

Install

  • 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.

  1. 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
  1. Install Moon
proto install moon
  1. 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>

Projects and common tasks

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.

Formatting and checks

  • Format entire workspace: moon run format-all-fix

Discover and diagnose tasks (optional)

Here are some useful commands to explore the monorepo structure and tasks.

moon task <task>
moon project <project>
moon query projects

Git Hooks

We 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.

Github Workflow

  1. Pull the latest changes from main.
git switch main && git pull
  1. Do some work on the main branch.

  2. Create a new branch for your changes.

git switch -c feature/my-changes
  1. Commit your changes.
git add . && git commit -m "feat: my changes"
  1. 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-changes

Creating Releases

We use changesets to manage releases. Follow the GitHub workflow, and add a changeset to your PR to create a new release.

moon changeset

Then merge your PR. Publishing to NPM will be automated with GitHub Actions.

Formatting

You might need to install dprint globally to get the vscode extension working.

curl -fsSL https://dprint.dev/install.sh | sh