Developed by 🦏 zoocityboy
Melos Workspace Cleaner
Melos Workspace Cleaner is a tool designed for cleaning monorepo workspaces built on the Melos. This tool provides an straightforward solution for maintaining and managing your monorepo project, especially when dealing with an extensive codebase or a multi-project environment.
Optimize your development process and enhance code management with this workspace cleaning tool, when you switching between branches.
Features
X
Custom pattern definitions using glob patternX
Integration option using Melos HooksX
Simplification of removal process of dependency_overrides, pubspec.lock and others.
🚀 Getting started
Installation
dart pub global activate mwc
Usage
# run command from terminal in root of the project
$ mwc -h
Melos Workspace Cleaner
Usage: mwc [options]
-h, --help Print this usage information.
--version Print the current version.
-p, --patterns Patterns to be deleted.
# melos.yaml
name: workspace
command:
clean:
hooks:
pre: mwc --patterns "**/pubspec.lock,**/pubspec_overrides.yaml"
Configuration
By default, the tool will look for mwc.yaml
file in the root of your project.
You can also specify the path to the configuration file using the --patterns
option.
priorities:
- nwc.yaml
- melos.yaml
- --patterns
string
- default values
**/pubspec.lock, **/pubspec_overrides.yaml
mwc.yaml
you can specify the patterns to be cleaned in the mwc.yaml
file. The patterns are defined using glob pattern.
mwc.yaml
file should be placed in the root of your project like melos.yaml
.
# mwc.yaml
- **/pubspec.lock
- **/pubspec_overrides.yaml
...
melos.yaml
You can also specify the patterns to be cleaned in the melos.yaml
file. The patterns are defined using glob pattern.
melos.yaml
file should be placed in the root of your project like mwc.yaml
.
# melos.yaml
name: workspace
command:
clean:
hooks:
pre: mwc
# optional configuration in `melos.yaml`
mwc:
- **/pubspec.lock
- **/pubspec_overrides.yaml
...
Manual
you can add patterns to be cleaned using the --patterns
option.
# run command from terminal in root of the project
$ mwc --patterns "**/pubspec.lock,**/pubspec_overrides.yaml"
📝 License
This project is licensed under the MIT License - see the LICENSE file for details.
Libraries
- mwc
- MWC - Melos Workspace Cleaner