UNPKG

@swell/cli

Version:

Swell's command line interface/utility

43 lines (42 loc) 1.43 kB
/** * App configuration for local development of Swell Apps. */ import Conf from 'conf'; import type { LocalApp } from '../types/index.js'; import type { App } from './apps/index.js'; /** * Checks if the swell config file exists at the given path, default to cwd. * * @param configFilePath - the path to the app config file * @returns boolean * @throws Error */ export declare function swellConfigFileExists(configFilePath?: string): Promise<boolean>; export declare function writeRcFile(path: string, data: any): Promise<void>; export declare function readRcFile(path: string): Promise<App>; /** * Returns a new configuration instance in the current working directory or * a parent directory. * * @param configDir - the path to the app config directory. If not provided, * the config file will be searched for in the current working directory or * a parent directory. * * @returns Conf */ declare function config(configDir?: string): Promise<LocalApp>; /** * Returns a new configuration instance in the current working directory only. * * @param path Path of the current working directory * @returns Conf */ export declare function newConfig(path?: string): Conf; /** * Returns a new configuration instance at the specified path. * * @param appPath Path of the current working directory * @returns Conf */ export declare function newConfigAtPath(appPath?: string): Promise<Conf>; export default config;