Skip to content

Commit c870e90

Browse files
committed
Add config option for custom name choices
1 parent 7a00374 commit c870e90

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/atomicComponent.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,10 @@ const atomicComponent = (
3232
type: "list",
3333
name: "type",
3434
message: "component type",
35-
choices: ["Atom", "Molecule", "Organism", "Template", "Page"],
35+
choices:
36+
fullConfig.choices !== undefined
37+
? ["Atoms", "Molecules", "Organisms", "Templates", "Pages"]
38+
: fullConfig.choices,
3639
});
3740

3841
prompts.push({

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import atomicComponent from "./atomicComponent";
44
import { FileNameFormatters } from "./types";
55

66
export interface GeneratorConfig {
7+
choices?: string[];
78
createIndex: boolean;
89
functional: boolean;
910
basePath: string;

0 commit comments

Comments
 (0)