Skip to content

Search

Documentation

dependency

The projects a game imports whole under deps/<alias>/, declared in [dependencies]. An installed dependency is read-only: fs. and assets.save refuse to…

On this page

The projects a game imports whole under deps/<alias>/, declared in [dependencies]. An installed dependency is read-only: fs.* and assets.save refuse to write into one. A relative path a dependency's script builds reads from that dependency's own folder.

6 functions, 0 constants. Scripts reach it as dependency::.

Functions

Argument kinds are the script values a call passes: node is a node handle, any a table or value of any kind, fn a callback.

function acts on what it does
add_path(string, string, string) — Declare alias = { path = "<path>" } in a game's [dependencies], comments kept, and install it. An empty game is the open project.
install(string) — Read a game's [dependencies] again and install each: what a dependency fetched while the editor runs needs to become a root. An empty game is the open project.
list() -> [any] — Every installed dependency: #{ alias, folder, game, kind, project, branch, tag, path, rev, license }. folder is how the game names it, kind is "forge" or "path", and a key that does not apply is empty.
make_local(string, string) -> [str] — Copy a dependency's file into the game and point the game's references at the copy; answers the game's files rewritten. The copy never updates. A document's own paths come out as the game names the dependency's files.
move_into([str], string) -> [str] — Move game files into a path dependency, each at the same place under its root, and point the game's references at deps/<alias>/…; answers the files rewritten.
of(string) -> str? — The alias of the dependency a path lies in, or nil for one of the game's own.