phigros.tools

Mod API

A mod is mods/<name>.lua or mods/<name>/init.lua, run in name order. Names starting with _ are skipped. Mods are loaded with require, so a mod can require("other") and get what it returns. A mod installed from GitHub (Publishing a mod) is a folder too, in installed/<owner>/<name>/, and runs before them. In a folder mod, require("util") runs the util.lua (or util/init.lua) of its own folder first, once.

Your editor knows all of this: node mod.mjs new sets it up (Your first mod), and node mod.mjs types brings the latest api.lua into a mod made before.