Moxi is a lightweight build tool designed to be a simple alternative to CMake, focusing on simplicity and efficiency. This guide provides detailed information on using Moxi for your projects.
Moxi uses a straightforward syntax for defining tasks in a Moxifile
. A task is defined as follows:
task: <task-name> => <command>
<task-name>
: A unique identifier for the task.<command>
: The command or set of commands to execute for the task.
Here's an example Moxifile
:
task: build => go build -o myapp main.go
task: test => go test ./...
To execute a task, use the following command:
moxi <task-name>
Replace <task-name>
with the actual task you want to run. If no task is specified, Moxi will run all tasks defined in the Moxifile
.
Example:
moxi build
Moxi supports task grouping for better organization. Groups are defined as follows:
group <group-name> {
task: <task-name> => <command>
task: <task-name> => <command>
}
Here's an example:
group build {
task: compile => go build -o myapp main.go
task: test => go test ./...
}
To run a task within a group:
moxi <group-name>:<task-name>
Example:
moxi build:compile
To run all tasks within a group, use the following command:
moxi <group-name>
Example:
moxi build
This command executes all tasks defined within the specified group.
For any questions or issues open an issue.
Happy building with Moxi!