@fesjs/utils
Version:
77 lines (62 loc) • 2.89 kB
text/typescript
export { generate } from '@babel/generator';
import * as parser from '@babel/parser';
export { parser };
export { default as traverse } from '@babel/traverse';
export { default as createDebug } from 'debug';
export { default as deepmerge } from 'deepmerge';
export { default as mkdirp } from 'mkdirp';
export { default as Mustache } from 'mustache';
export { default as portfinder } from 'portfinder';
export { default as resolve } from 'resolve';
export { default as rimraf } from 'rimraf';
export { default as semver } from 'semver';
export { default as yParser } from 'yargs-parser';
declare const _default$4: (port: number) => void;
declare function compatESModuleRequire(m: any): any;
declare const _default$3: (ms: number) => Promise<unknown>;
declare function getAppPath(absSrcPath: string): string | null;
declare const _default$2: (userHost?: string) => string;
declare function getPort(defaultPort?: string | number): Promise<number>;
interface Config {
targets?: Record<string, string>;
}
interface TargetsAndBrowsersListResult {
targets: Record<string, string>;
browserslist: string[];
}
declare function getTargetsAndBrowsersList({ config }: {
config: Config;
}): TargetsAndBrowsersListResult;
declare const prefixes: {
wait: string;
error: string;
warn: string;
ready: string;
info: string;
event: string;
debug: string;
};
declare function wait(...message: any[]): void;
declare function error(...message: any[]): void;
declare function warn(...message: any[]): void;
declare function ready(...message: any[]): void;
declare function info(...message: any[]): void;
declare function event(...message: any[]): void;
declare const logger_error: typeof error;
declare const logger_event: typeof event;
declare const logger_info: typeof info;
declare const logger_prefixes: typeof prefixes;
declare const logger_ready: typeof ready;
declare const logger_wait: typeof wait;
declare const logger_warn: typeof warn;
declare namespace logger {
export { logger_error as error, logger_event as event, logger_info as info, logger_prefixes as prefixes, logger_ready as ready, logger_wait as wait, logger_warn as warn };
}
type ConfigValue = any;
type ConfigFunction = (value: any) => any;
type ConfigObject = Record<string, ConfigValue | ConfigFunction>;
declare function mergeConfig(defaultConfig: ConfigObject, ...configs: (ConfigObject | undefined)[]): ConfigObject;
declare const _default$1: (publicPath: string) => Record<string, string | undefined>;
declare const _default: (obj: Record<string, any>) => Record<string, string>;
declare function winPath(path: string): string;
export { _default$4 as changePort, compatESModuleRequire, _default$3 as delay, getAppPath, _default$2 as getHostName, getPort, getTargetsAndBrowsersList, logger, mergeConfig, _default$1 as resolveRuntimeEnv, _default as stringifyObjValue, winPath };