Skip to content

EditorFilesOptions beta ​

Interface of @v12-engine/editor/vite

ts
export interface EditorFilesOptions

What editorFiles is told of a project's layout. Paths are from the root of the project

Members ​

code ​

ts
code?: string;

The folder of the project's code, searched for what uses an asset: src

gameFolder ​

ts
gameFolder?: (game: string) => string | undefined;

Where a game is, by its id, for a project laid out another way: (id) => 'src/game' for a project that is one game. games for the ids it gives nothing for

games ​

ts
games?: string;

Where the games are, each in a folder of its id: apps/example/src/games when left out

ids ​

ts
ids?: boolean;

Whether <game>.ids.ts is written beside a game's files as they change (docs/editor/files.md): yes when left out

modules ​

ts
modules?: {
        engine?: string;
        looks?: string;
        client?: string;
    };

The modules the plugin reads and writes a map and a game's looks with, as the dev server loads them: the packages' own (@v12-engine/engine, @v12-engine/client/looks-file) when left out; client is the module the page's models and textures saved on disk are told to (hotFiles, @v12-engine/client)

public ​

ts
public?: string;

The folder whose files are served as they are, where a game's own assets go (<public>/games/<id>): public

run ​

ts
run?: readonly string[];

The scripts of the project's package.json the editor's Run panel may start and stop while developing: run: ['dev', 'server', 'app']. None when left out. Only these, as they are written there: nothing the editor asks goes into the command (docs/editor/play.md, "Run the project's scripts")

scaffold ​

ts
scaffold?: readonly string[] | ((game: string) => readonly string[]);

The folders the editor may write new code into (New with code: docs/editor/data.md, "Start a definition with code"), under code, from the root of the project: scaffold: ['src/game'], or by game for a project of many. None when left out, and then the editor writes no code. Only a stub from the editor's templates, and never over a file

scenarios ​

ts
scenarios?: string;

Where scenarios saved from the editor go, each game in a folder of its id: tests/scenarios

sources ​

ts
sources?: string[];

Folders searched for where something is defined (Alt+click in the editor), after the game's own: the other games, when left out