modules

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package modules holds the built-in, data-driven justfile modules. Each module contributes a few recipes; @init toggles modules and the scaffold package assembles the selected ones into a justfile.

Recipe bodies are text/template strings rendered with the detected detect.Project. They use [[ ]] delimiters (set by the scaffold package) so they never collide with just's own {{ }} interpolation syntax.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveRequires

func ResolveRequires(applicable []Module, selected map[string]bool) map[string]bool

ResolveRequires expands a selection to include every module required (transitively) by a selected one. Cycle-safe.

Types

type Module

type Module struct {
	ID       string                      // "lint", "test", "build", "ci", "fmt"
	Title    string                      // shown in the huh form
	Tools    []string                    // binaries the recipes call (v2 @doctor)
	Detect   func(p detect.Project) bool // whether to pre-tick this module
	Recipes  string                      // [[ ]]-delimited template body
	Requires []string                    // other module IDs this depends on
}

Module is a composable unit of a justfile (fmt, lint, test, build, ci, …).

func ForProject

func ForProject(p detect.Project) []Module

ForProject returns the modules applicable to a detected project, in display order. Returns nil for an unrecognized stack.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL