Skip to content

Search

Documentation

export

Exports the project being edited. targets lists what this install can build; start runs one off the frame and reports as the export_event event…

On this page

Exports the project being edited. targets lists what this install can build; start runs one off the frame and reports as the export_event event: events::listen(node, "export_event"), heard as on_export_event, as each export starts, finishes or fails.

5 functions, 0 constants. Scripts reach it as export::.

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
output(string) -> string — Where an export for this target will be written, as the project's [export] output decides.
preview(string, string) -> export::Preview? — What one file becomes in a target's pack, as the Import tab shows it: { source, before, after, width, height, drawn_width, drawn_height, gpu_bytes }, where source is the file or the variant that ships and drawn_* is zero unless a smaller copy does. Nil when the file does not ship there. An empty target is this machine's own.
running_count() -> int — How many exports are in flight.
start(string, export::StartOptions?) -> bool — Export the edited project for one target, on a thread. download allows fetching a missing template, sign names an identity, output overrides where it lands. Answers false while a recording plays.
targets() -> [export::Target] — Every target, each { name, runtime, bundle, installed, fetchable, note }: the runtime the project's [export] runtime puts it on, whether that is already here, whether a missing one could be fetched, and what a signed build of it would also need.

Are you sure?