@roots/bud
Version:
Configurable, extensible build tools for modern single and multi-page web applications
77 lines (76 loc) • 2.23 kB
TypeScript
import type { Context } from '@roots/bud-framework/context';
import type { BaseContext } from '@roots/bud-support/clipanion';
import type { ExecaReturnValue } from '@roots/bud-support/execa';
import { Bud } from '@roots/bud-framework';
import { Command, Option } from '@roots/bud-support/clipanion';
import { BudError } from '@roots/bud-support/errors';
import * as Ink from '@roots/bud-support/ink';
/**
* Base {@link Command}
*/
export default class BudCommand extends Command<BaseContext & Context> {
/**
* {@link Command.paths}
*/
static paths: Array<Array<string>>;
/**
* {@link Command.usage}
*/
static usage: import("@roots/bud-support/clipanion").Usage;
basedir: string;
bud?: Bud | undefined;
cache: boolean | "filesystem" | "memory";
clean: boolean;
color: boolean;
debug: boolean;
dry: boolean;
filter: string[];
force: boolean;
ignoreErrors: boolean;
input: string;
log: boolean;
mode: "development" | "production";
output: string;
notify: boolean;
publicPath: string;
silent: boolean;
storage: string;
use: string[];
verbose: boolean;
/**
* Render static cli output
*/
renderStatic(el: React.ReactElement): Ink.Instance;
/**
* Execute arbitrary sh command with inherited stdio
*/
$(bin: string, args: Array<string>, options?: {}, bail?: () => any): Promise<ExecaReturnValue<string>>;
override([argValue, envKey, manifestPath, callback]: [
argValue: any,
envKey: string,
manifestPath: string,
callback: (bud: Bud) => (value: any) => Promise<any>
]): Promise<void>;
/**
* Apply context from manifest to bud.js instance
*/
applyUserOptions(bud: Bud): Promise<void>;
/**
* Handle errors
*/
catch(error: BudError): Promise<void>;
/**
* {@link Command.execute}
*/
execute(): Promise<number | void>;
/**
* Make {@link Bud} instance
*/
makeBud(): Promise<Bud>;
/**
* Run a binary.
*/
run(path: Array<string>, userArgs?: Array<string>, defaultArgs?: Array<string>): Promise<number>;
}
export type { BaseContext, Context };
export { Option };