/// <reference types="node" />
import { BuildConfig, UserConfig } from '../build';
export declare type SrcOptions = {
    projectRoot: string;
};
export declare function createPlugin(p: Plugin, outputDir: string, projectRoot: string): void;
export declare class ResFile {
    origin: string;
    readonly base: string;
    private _content;
    constructor(origin: string, base: string);
    contents: Buffer;
    path: string;
    options: FileOptions;
    outputDir?: string;
    readonly relative: string;
    readonly extname: 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;
