@wonderlandengine/editor-api
Version:
Wonderland Engine's Editor API for plugins - very experimental.
66 lines (65 loc) • 1.55 kB
TypeScript
import { ProjectData } from './data.js';
/**
* Workspace access.
*
* Allows to read the current workspace setup.
*/
export interface Workspace {
/**
* Workspace projects
*
* The main project is always at index/id 0
*/
readonly projects: Array<ProjectData>;
projectId(filename: String): number;
/**
* Root directory of the project
*
* Directory in which the project file resides in.
*/
readonly root: string;
/**
* Main project filename
*
* Filename relative to the workspace root directory.
*
* @deprecated Use the per-project accessors instead
*/
readonly filename: string;
/**
* Main project filename
*
* Filename relative to the workspace root directory.
*/
readonly mainFilename: string;
/**
* Project deploy path
* @returns `<root>/deploy`
*/
readonly deployPath: string;
/**
* Project cache path
* @returns `<root>/cache`
*/
readonly cachePath: string;
/**
* Project package.json path
* @returns `<root>/package.json`
*/
readonly packageJsonPath: string;
/**
* Project node_modules path
* @returns `<root>/node_modules`
*/
readonly nodeModulesPath: string;
/**
* Project shaders path
* @returns `<root>/shaders`
*/
readonly shadersPath: string;
}
export declare const workspace: Workspace;
/**
* @deprecated Use the {@link workspace} export instead
*/
export declare const project: Workspace;