presta
Version:
Hyper minimal framework for the modern web.
25 lines (24 loc) • 966 B
TypeScript
import { PrestaCLIDevOptions, PrestaCLIBuildOptions } from './cli';
import { Plugin } from './plugins';
export declare type Options = {
files: string[];
output: string;
assets: string;
plugins: Plugin[];
port: number;
};
export declare type Config = Options & {
env: string;
staticOutputDir: string;
functionsOutputDir: string;
functionsManifest: string;
};
export declare const defaultConfigFilepath = "presta.config.js";
export declare function getAvailablePort(preferred: string): Promise<number>;
/**
* Fetch a config file. If one was specified by the user, let them know if
* anything goes wrong. Outside watch mode, this should exit(1) if the user
* provided a config and there was an error
*/
export declare function getConfigFile(filepath?: string, shouldExit?: boolean): any;
export declare function create(env: string, cli: PrestaCLIBuildOptions | PrestaCLIDevOptions, file: Partial<Options>, cwd?: string): Config;