Skip to content

Search

Документация

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…

На тази страница

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. Every runtime has list and of; the verbs that write a project are the editor's.

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() -> [dependency::Dependency] — Every installed dependency: its alias, where it sits, where it came from and its licence.
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.

Наистина ли?