File tree Expand file tree Collapse file tree 1 file changed +26
-8
lines changed Expand file tree Collapse file tree 1 file changed +26
-8
lines changed Original file line number Diff line number Diff line change @@ -42,14 +42,32 @@ export default async function createReadme({
4242 -T ghp_0123456789abcdefghjklmnopqrstuvwxyzA \\
4343 -R "${ owner } /*"` ;
4444
45- Object . entries ( scriptOptions ) . forEach ( ( [ name , { required, example } ] ) => {
46- if ( ! required ) return ;
47- minimalUsage += ` \\
48- --${ name } ${ example } ` ;
49- } ) ;
50- Object . entries ( scriptOptions ) . forEach ( ( [ name , { required, example } ] ) => {
51- fullUsage += ` \\
52- --${ name } ${ example } ` ;
45+ Object . entries ( scriptOptions ) . forEach (
46+ ( [ name , { type, required, example } ] ) => {
47+ if ( ! required ) return ;
48+ if ( type === "boolean" ) {
49+ const CliOption = decamelize ( name , {
50+ separator : "-" ,
51+ } ) ;
52+ minimalUsage += ` \\
53+ --${ CliOption } ` ;
54+ } else {
55+ minimalUsage += ` \\
56+ --${ name } ${ example } ` ;
57+ }
58+ }
59+ ) ;
60+ Object . entries ( scriptOptions ) . forEach ( ( [ name , { type, example } ] ) => {
61+ if ( type === "boolean" ) {
62+ const CliOption = decamelize ( name , {
63+ separator : "-" ,
64+ } ) ;
65+ fullUsage += ` \\
66+ --${ CliOption } ` ;
67+ } else {
68+ fullUsage += ` \\
69+ --${ name } ${ example } ` ;
70+ }
5371 } ) ;
5472
5573 content += `## Usage
You can’t perform that action at this time.
0 commit comments