/// <reference types="node" />
import { BuildConfig, UserConfig } from '../build';
export declare type SrcOptions = {
    root: string;
    cwd: string;
};
export declare function createPlugin(p: Plugin, outputDir: string, projectRoot: string): void;
export declare class ResFile {
    private _content;
    origin: string;
    readonly base: string;
    constructor(origin: string, base: string);
    contents: Buffer;
    readonly extname: string;
    private _isDirty;
    readonly isDirty: boolean;
    /**
     * @internal
     */
    setContents(value: Buffer): void;
    path: string;
    options: FileOptions;
    outputDir?: string;
    readonly relative: string;
}
export declare type FileOptions = {
    outputDir?: string;
    type?: string;
    subkeys?: string[] | string;
};
export declare function build(buildConfig: BuildConfig, userConfig: UserConfig): Promise<import("./reporter").AssetsDiagnosticResult>;
export declare type PluginContext = {
    projectRoot: string;
    outputDir: string;
    buildConfig: {
        command: "build" | "publish";
    };
    createFile: (relativePath: string, content: Buffer, options?: any) => void;
};
export declare type Plugin = {
    onStart?: (param: PluginContext) => void | Promise<void>;
    onFile: (file: ResFile) => Promise<ResFile | null>;
    onFileLater?: (file: ResFile) => Promise<ResFile | null>;
    onFinish: (param: PluginContext) => void | Promise<void>;
};
export declare function compile(projectRoot: string): void;
