Multi-repo Workspace Manager
npm install -g @gabortorma/mwm
mwm --help
mwm init --help
Init will initalize a new repo in a directory below the one you are positioned in.
mwm init -fix-replacements
mwm init --fixReplacements
This will replace the information in the template repository with the information you supply, either by prompts or command line. If omitted you will be prompted.
mwm init -organization <name>
mwm init --owner <name>
This will set the info of the "author"-field in the package.json to the user/organization . Important: the must exist in the .mwmrc or mwm.config file; see below, however, you will be asked to select a valid entry if you supply one that doesn't exist. If omitted you will be prompted.
mwm init --name <name>
This is the name the of the repo created in the Github of the "owner/author/organization". This will set the info of the"name"-field of the package.json to the . If ommited you will be prompted.
mwm init -desc <desc>
mwm init --description <desc>
This will set the info of the "description"-field of the package.json to . If ommited you will be prompted.
mwm init --no-private
By default the repo created will be set private, by providing this switch you will make it public. You will not be prompted for this option if omitted.
mwm init --keywords <keywords>
This will set the info of the"keywords"-field of the package.json to . The string must be enclosed in " and use commas between the keywords: "one,two,three". You will not be prompted for this option if omitted.
mwm release --help
Generate new submodule from template
mwm generate --help
Required to declare minimum one owner with GitHub token in the config file.
Recommended to use .mwmrc
file for token and add it to .gitignore
.
owners.NAME_OF_OWNER.token = ghp_xxxxx
Required scopes for the token:
- repo
- write:packages
- delete:packages
- delete_repo
You can use mwm.config
or .mwmrc
files for configuration.
MWM uses unjs/c12 for reading config files. Check the documentation for more information and all available options.
See the loadConfig options.
You can use defineMWMConfig
function in mwm.config.ts
file to define the config with TypeScript support.
import { defineMWMConfig } from '@gabortorma/mwm'
export default defineMWMConfig({
// your own config
})
MIT License © 2023-PRESENT Gábor Torma