@nlabs/lex
Version:
49 lines (48 loc) • 2.34 kB
TypeScript
/**
* Copyright (c) 2018-Present, Nitrogen Labs, Inc.
* Copyrights licensed under the MIT License. See the accompanying LICENSE file for terms.
*/
import type { LexConfigType } from '../LexConfig.js';
export declare const cwd: string;
export interface GetFilenamesProps {
readonly callback?: (status: number) => void;
readonly cliName?: string;
readonly name?: string;
readonly quiet?: boolean;
readonly type?: string;
readonly useTypescript?: boolean;
}
interface FilenamesResult {
nameCaps: string;
templateExt: string;
templatePath: string;
templateReact: string;
}
export declare const getFilenames: (props: GetFilenamesProps) => FilenamesResult | void;
export interface Spinner {
fail: (text?: string) => void;
start: (text?: string) => void;
succeed: (text?: string) => void;
text?: string;
}
export declare const createSpinner: (quiet?: boolean) => Spinner;
export declare const createProgressBar: (percentage: number) => string;
export declare const handleWebpackProgress: (output: string, spinner: Spinner, quiet: boolean, emoji: string, action: string) => void;
export declare const copyFiles: (files: string[], typeName: string, spinner: any, config: LexConfigType) => Promise<void>;
export declare const copyConfiguredFiles: (spinner: any, config: LexConfigType, quiet: boolean) => Promise<void>;
export declare const copyFileSync: (source: string, target: string) => void;
export declare const copyFolderRecursiveSync: (source: string, target: string) => void;
export declare const getPackageJson: (packagePath?: string) => any;
export declare const getFilesByExt: (ext: string, config: LexConfigType) => string[];
export declare const removeConflictModules: (moduleList: object) => object;
export declare const removeFiles: (fileName: string, isRelative?: boolean) => Promise<unknown>;
export declare const removeModules: () => Promise<unknown>;
export declare const setPackageJson: (json: any, packagePath?: string) => void;
export interface LinkedModuleType {
readonly name: string;
readonly path: string;
}
export declare const linkedModules: (startPath?: string) => LinkedModuleType[];
export declare const checkLinkedModules: () => void;
export declare const updateTemplateName: (filePath: string, replace: string, replaceCaps: string) => void;
export {};