Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

lush

Core runtime methods for task registration.

task

Registers a named task.

Signatures

lush.task(name, handler)
lush.task(name, opts, handler)

Parameters

ParameterTypeDescription
namestringTask name used on CLI (lush <name>).
optstable/nilOptional dependency table. Can be {"dep1", "dep2"} or { depends = "dep1" } or { depends = {"dep1", "dep2"} }.
handlerfunctionTask body to execute.

Returns

None

Example

lush.task("build", function()
  sys.exec("gcc main.c -o main")
end)

lush.task("run", { depends = { "build" } }, function()
  sys.exec("./main")
end)

rule

Placeholder API (currently no-op).

Signature

lush.rule(output, input, handler)

target

Placeholder API (currently no-op).

Signature

lush.target(files, opts)

Constants

VERSION

Current Lush version string.