You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The exception in the config is that `output`, when used in Node directly, may also be passed a function for each input file to output into a dynamic path:
description: `A glob pattern of template files to load.\nA template file may be of any type and extension, and supports Handlebars as a parsing engine for the file names and contents, so you may customize both with variables from your configuration.`,
40
44
multiple: true,
41
45
},
42
46
{
43
-
name: 'output',
44
-
alias: 'o',
47
+
name: "output",
48
+
alias: "o",
45
49
type: filePathParser,
46
-
typeLabel: '{underline File}',
50
+
typeLabel: "{underline File}",
47
51
description: `The output directory to put the new files in. They will attempt to maintain their regular structure as they are found, if possible.`,
48
52
},
49
53
{
50
-
name: 'locals',
51
-
alias: 'l',
52
-
description: `A key-value map for the template to use in parsing.`,
53
-
multiple: true,
54
-
typeLabel: '{underline Key=Value}',
54
+
name: "locals",
55
+
alias: "l",
56
+
description: `A JSON string for the template to use in parsing.`,
57
+
typeLabel: "{underline JSON string}",
55
58
type: localsParser,
56
59
},
57
60
{
58
-
name: 'create-sub-folder',
59
-
alias: 'S',
60
-
typeLabel: '{underline Boolean}',
61
-
description: 'Whether to create a subdirectory with \\{\\{Name\\}\\} in the {underline output} directory. {bold default=true}',
61
+
name: "overwrite",
62
+
alias: "w",
63
+
description: `Whether to overwrite files when they are found to already exist. {bold default=true}`,
64
+
type: booleanParser,
65
+
typeLabel: "{underline Boolean}",
66
+
defaultValue: true,
67
+
},
68
+
{
69
+
name: "create-sub-folder",
70
+
alias: "S",
71
+
typeLabel: "{underline Boolean}",
72
+
description:
73
+
"Whether to create a subdirectory with \\{\\{Name\\}\\} in the {underline output} directory. {bold default=true}",
62
74
type: booleanParser,
63
75
defaultValue: true,
64
76
},
65
77
{
66
-
name: 'help',
67
-
alias: 'h',
78
+
name: "help",
79
+
alias: "h",
68
80
type: Boolean,
69
-
description: 'Display this help message',
81
+
description: "Display this help message",
70
82
},
71
83
]
72
84
73
85
constargs=cliArgs(defs,{camelCase: true})
74
86
75
87
consthelp=[
76
-
{header: 'Scaffold Generator',content: `Generate scaffolds for your project based on file templates.\nUsage: {bold simple-scaffold} {underline scaffold-name} {underline [options]}`},
77
-
{header: 'Options',optionList: defs}
88
+
{
89
+
header: "Scaffold Generator",
90
+
content: `Generate scaffolds for your project based on file templates.\nUsage: {bold simple-scaffold} {underline scaffold-name} {underline [options]}`,
0 commit comments