Skip to content

Latest commit

 

History

History
79 lines (59 loc) · 4.03 KB

README.md

File metadata and controls

79 lines (59 loc) · 4.03 KB

Melos

A tool for managing Dart projects with multiple packages, inspired by Lerna.

Melos

📚 Documentation | License

Install

dart pub global activate melos

About

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.

What can Melos do?

  • 🔗 Link local packages in your workspace together without adding dependency overrides.
  • 📦 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.
  • ⚡ 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 boostrap.
    • Vscode code doesn't require advanced integration to work.

Local development setup

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

README Badge

Using Melos? Add a README badge to show it off:

melos

[![melos](https://img.shields.io/badge/maintained%20with-melos-f700ff.svg?style=flat-square)](https://github.com/invertase/melos)

Built and maintained by Invertase.