UNPKG

@quenty/nevermore-template-helpers

Version:

Helpers to generate Nevermore package and game templates

52 lines 1.99 kB
export interface RojoBuildOptions { /** Absolute path to the rojo project JSON file */ projectPath: string; /** -o flag: absolute path to output file (.rbxl / .rbxm) */ output?: string; /** --plugin flag: filename placed in Studio's plugins folder */ plugin?: string; /** Absolute path to Studio's plugins folder (required when plugin is set) */ pluginsFolder?: string; } export interface BuildContextOptions { /** mkdtemp prefix (e.g. 'rojo-build-') */ prefix?: string; } /** * Manages a build directory lifecycle for rojo builds. * Handles temp directory creation/cleanup and persistent build directories. */ export declare class BuildContext { private readonly _targetdir; private _cleaned; private readonly _trackedFiles; private constructor(); /** * Create and initialize a BuildContext. The directory is ready to use * when this resolves. */ static createAsync(options?: BuildContextOptions): Promise<BuildContext>; /** Absolute path to the managed build directory. */ get buildDir(): string; /** Resolve a relative path within the build directory. */ resolvePath(relativePath: string): string; /** * Run rojo build using this context's directory. * Returns the full plugin output path when in plugin mode, undefined otherwise. */ rojoBuildAsync(options: RojoBuildOptions): Promise<string | undefined>; /** * Execute a Lune transform script with the given arguments. */ executeLuneTransformScriptAsync(scriptPath: string, ...args: string[]): Promise<void>; /** * Write a file into the build directory. * @returns Absolute path to the written file. */ writeFileAsync(relativePath: string, content: string): Promise<string>; /** * Clean up the build directory and tracked files. Idempotent — safe to call multiple times. */ cleanupAsync(): Promise<void>; } //# sourceMappingURL=build-context.d.ts.map