UNPKG

966 BTypeScriptView Raw
1import { PrestaCLIDevOptions, PrestaCLIBuildOptions } from './cli';
2import { Plugin } from './plugins';
3export declare type Options = {
4 files: string[];
5 output: string;
6 assets: string;
7 plugins: Plugin[];
8 port: number;
9};
10export declare type Config = Options & {
11 env: string;
12 staticOutputDir: string;
13 functionsOutputDir: string;
14 functionsManifest: string;
15};
16export declare const defaultConfigFilepath = "presta.config.js";
17export declare function getAvailablePort(preferred: string): Promise<number>;
18/**
19 * Fetch a config file. If one was specified by the user, let them know if
20 * anything goes wrong. Outside watch mode, this should exit(1) if the user
21 * provided a config and there was an error
22 */
23export declare function getConfigFile(filepath?: string, shouldExit?: boolean): any;
24export declare function create(env: string, cli: PrestaCLIBuildOptions | PrestaCLIDevOptions, file: Partial<Options>, cwd?: string): Config;