/// import { CommonExecOptions } from "node:child_process"; import { OutputOptions, Plugin } from "rollup"; export interface RollupConditionalExecOptions { command: string; /** * Override the options object provided to `exec`. */ options?: CommonExecOptions; /** * A condition to satisfy before running a given command. * * The `OutputOptions` provided to `generateBundle` are passed in to give more * options when determining conditions to satisfy. */ condition?: (() => Promise | boolean) | ((outputOpts: OutputOptions) => Promise | boolean); /** * This can be used to clean up state, if you have a condition that needs * to be reset after a bundle compilation. */ afterExec?: () => Promise | void; /** * Called when exec throws an error. */ onError?: (error: Error) => Promise | void; } export default function conditionalExec(opts: RollupConditionalExecOptions): Plugin;