A tool for managing Dart projects with multiple packages, inspired by Lerna.
Documentation β’ License
Splitting up large code bases into separate independently versioned packages is extremely useful for code sharing. However, making changes across many repositories is messy and difficult to track, and testing across repositories gets complicated really fast.
To solve these (and many other) problems, some projects will organize their code bases into multi-package repositories (sometimes called monorepos).
Melos is a tool that optimizes the workflow around managing multi-package repositories with git and Pub.
- π Override
pub get
in development to install packages in your workspace from path without having to edit yourpubspec.yaml
. - π¦ Automatically version, create changelogs and publish your packages using Conventional Commits.
- π Pre-define advanced custom scripts for your workspace in your melos.yaml configuration to use via
melos run [scriptName]
. Anyone contributing to your workspace can just run melos run to be prompted to select a script from a list with descriptions of each script.- Scripts can even prompt to select a package to run against with pre-defined filters.
- β‘ Execute commands across your packages easily with melos exec -- command here with additional concurrency and fail-fast options.
- Environment variables containing various information about the current package and the workspace are available in each execution.
- Can be combined with all package filters.
- π― Many advanced package filtering options allowing you to target specific packages or groups of packages in your workspace.
- β¨οΈ Advanced support for IntelliJ IDEs with automatic creation of run configurations for workspace defined scripts and more on workspace bootstrap.
- Vscode code doesn't require advanced integration to work.
To setup and use this melos mono repo locally for the purposes of contributing, clone it and run the following commands from the root of the repository:
# Remove previous instances of melos:
dart pub global deactivate melos
# Activate 'melos' from path:
dart pub global activate --source="path" . --executable="melos"
# Confirm you now using a local development version:
melos --help
# You should now see a banner printed at the top of the help output similar to:
# ---------------------------------------------------------
# | You are running a local development version of melos. |
# ---------------------------------------------------------
dart pub global activate melos
Using Melos? Add a README badge to show it off:
[![melos](https://img.shields.io/badge/maintained%20with-melos-f700ff.svg?style=flat-square)](https://github.com/invertase/melos)
Built and maintained by Invertase.