import { ExecaScriptMethod } from 'execa'; export type TaskOptions = { /** * Optional script name. It will be used for output logs and watch mode. */ name?: string; /** * Watch mode configuration: paths to watch, relative to the script's directory. */ watch?: string | string[]; /** * Watch mode configuration: paths to ignore, relative to the script's directory. */ ignore?: string | string[]; /** * Script's dependencies, that should be executed before running this script. */ deps?: string | string[]; /** * Custom environment to use when running this task. * Very handy to pass in `NODE_OPTIONS: '--inspect'` or similar. * Note that these ENV variables take precedance over the `--env-file` variables. */ env?: Record; }; export type TaskUtils = { /** * Absolute path of the script directory */ __dirname: string; /** * Absolute file path of the build script itself */ __filename: string; /** * An execa instance, with current working directory bound to script's directory. */ $: ExecaScriptMethod; /** * Set to true if the script is being run under the Kubik's TUI. * This is usually used to conditionally force colors in build scripts. */ isTUI: boolean; }; export declare class Task { /** * Initialize a Task so that Kubik knows how to run it. * * @param meta pass your scripts `import.meta` as the first parameter * @param options * @returns */ static init(meta: { url: string; }, options?: TaskOptions): TaskUtils; /** * By default, tasks are considered failed when they exis with non-zero code, * and succeeded when they exit with zero code. * * Certain tasks, for example, start a server, and succeed when the server is running. * This process doesn't end, and these tasks can be marked as completed manually. */ static done(): void; }