@captive/plop-config
Version:
42 lines (41 loc) • 1.18 kB
TypeScript
import { PlopPluginOptions } from '../../plugin.js';
export interface ReactComponentGeneratorOptions {
styleSheet: 'css' | 'scss';
test: NonNullable<PlopPluginOptions['test']>;
componentPath: string;
}
export declare const reactComponentGenerator: (options: ReactComponentGeneratorOptions) => {
name: string;
generator: {
prompts: {
type: string;
message: string;
suffix: string;
validate: (promptValue: string) => boolean | string;
name: string;
}[];
actions: () => ({
path: string;
data: {
styleSheet: "css" | "scss";
test: NonNullable<PlopPluginOptions["test"]>;
componentPath: string;
importTest?: never;
};
template: string;
type: "add";
} | {
path: string;
template: string;
type: "add";
data: {
importTest: string;
};
} | {
path: string;
template: string;
type: "add";
data?: never;
})[];
};
};