Install via NPM:
# or, using NPM
npm i -g multicmd-runner
# Using Yarn:
yarn global multicmd-runner
Navigate to the root of your project directory and initialize multicmd-runner:
mcr init
or
multicmd-runner init
Now, a file named multicmd-runner.config.json is created in the root directory. It looks something like this 👇🏻 and you can customized as per your need.
{
"dev": [
{
"title": "Dashboard Development Server",
"command": "pnpm dev",
"location": "/dashboard"
}
],
"build": [
{
"title": "Dashboard Build",
"command": "pnpm build",
"location": "/dashboard"
}
],
...
}
mcr <your_key>
or
multicmd-runner <your_key>
# Example
mcr dev
mcr build
# or
multicmd-runner dev
multicmd-runner build
Alternatively, you can directly create an array of command objects.
[
{
"title": "Dashboard Development Server",
"command": "pnpm dev",
"location": "/dashboard"
}
]
You can also run an array of commands directly if you don't specify any key.
mcr
or
multicmd-runner
The command object must follow this format 👇🏻
{
"title": "Your title",
"command": "Specify you command command",
"location": "path where command is run."
}
// The title is an optional field. If not provided, the location will be taken by default.