Cell API
    Preparing search index...

    Interface PresetOutputContext

    What Preset.output gets after the bundles are written.

    interface PresetOutputContext {
        env: ProcessEnv;
        manifest: OutputManifest;
        options: Record<string, unknown>;
        outDir: string;
        project: ProjectModel;
        root: string;
        warn(message: string): void;
        write(
            path: string,
            content: string | Uint8Array<ArrayBufferLike>,
            mode?: number,
        ): void;
    }
    Index
    env: ProcessEnv
    manifest: OutputManifest

    The manifest the build wrote; it is saved again after output returns, with the preset's changes.

    options: Record<string, unknown>

    The preset's field of cell.config.ts (named like the preset), validated by Preset.options; {} when absent.

    outDir: string

    Absolute output directory.

    project: ProjectModel
    root: string

    Project root.

    • Reported like other build warnings (stderr, and warnings of --json).

      Parameters

      • message: string

      Returns void

    • Writes a file relative to the output directory and lists it in manifest.files; mode e.g. 0o755 for a start script.

      Parameters

      • path: string
      • content: string | Uint8Array<ArrayBufferLike>
      • Optionalmode: number

      Returns void