Skip to content
This repository was archived by the owner on Feb 18, 2024. It is now read-only.

Commit 0f1d01b

Browse files
committed
Add config option for custom name choices
1 parent 59bc676 commit 0f1d01b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/atomicComponent.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ const atomicComponent = (
99
plop: NodePlopAPI
1010
) => {
1111
const defaultConfig: GeneratorConfig = {
12+
<<<<<<< HEAD
1213
additionalTemplates: false,
14+
=======
15+
choices: ["Atoms", "Molecules", "Organisms", "Templates", "Pages"],
16+
>>>>>>> 1818e17 (Add config option for custom name choices)
1317
createIndex: true,
1418
createStyles: true,
1519
functional: true,
@@ -34,7 +38,7 @@ const atomicComponent = (
3438
type: "list",
3539
name: "type",
3640
message: "component type",
37-
choices: ["Atom", "Molecule", "Organism", "Template", "Page"],
41+
choices: fullConfig.choices,
3842
});
3943

4044
prompts.push({

src/index.ts

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

66
export interface GeneratorConfig {
77
additionalTemplates: { extension: string; template: string }[] | false;
8+
choices: string[];
89
createIndex: boolean;
910
createStyles: boolean;
1011
functional: boolean;

0 commit comments

Comments
 (0)