templates-mo
Version:
Templates is a scaffolding framework that makes code generation simple, dynamic, and reusable. Generate files, parts of your app, or whole project structures—without the repetitive copy-pasting
48 lines (47 loc) • 1.66 kB
TypeScript
import Templates from "../templates";
export type OutputProcessor = {
args: (paths: string[]) => ReadonlyArray<string>;
command: string;
name: string;
};
export declare const FORMATTER_PROMPT: {
readonly name: "formatter";
readonly aliases: ["format"];
readonly description: "Type of formatter you would like to use to format the component";
readonly message: "What type of formatter do you want to use to format your code";
readonly type: "list";
readonly tpsType: "data";
readonly hidden: true;
readonly choices: ["none", "prettier", "biome"];
readonly default: "none";
};
export type formatters = (typeof FORMATTER_PROMPT.choices)[number];
export declare const runFormatter: (formatter: formatters, cwd: string, paths: string[], tps?: Templates) => Promise<void>;
/**
* Map of supported linters
*/
export declare const linters: {
readonly biome: {
readonly args: (paths: string[]) => string[];
readonly command: "biome";
readonly name: "Biome (Lint)";
};
readonly eslint: {
readonly args: (paths: string[]) => string[];
readonly command: "eslint";
readonly name: "ESLint";
};
};
export declare const runCommand: (module: OutputProcessor, cwd: string, paths: string[], tps?: Templates) => void;
export declare const packageManagers: {
readonly npm: {
readonly args: (paths: string[]) => string[];
readonly command: "npm";
readonly name: "Npm Install";
};
readonly yarn: {
readonly args: (paths: string[]) => string[];
readonly command: "yarn";
readonly name: "Yarn Install";
};
};