File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ const createCommandFile = async (nestedCategory,docs) => {
132132 // ARGUMENTS string
133133 docs . command . shift ( ) ;
134134 if ( docs . positionals . length ) {
135- const argumentsString = `### Arguments\n\nOption | Default | Description\n--------- | ----------- | -----------\n${ docs . positionals } ` ;
135+ const argumentsString = `### Arguments\n\nOption | Alias | Default | Description\n--------- | --------- | ----------- | -----------\n${ docs . positionals } ` ;
136136 if ( skeletonFileExists ) {
137137 finalFileString = finalFileString . replace ( '{{ARGUMENTS}}' , argumentsString ) ;
138138 } else {
@@ -144,7 +144,7 @@ const createCommandFile = async (nestedCategory,docs) => {
144144 if ( docs . options ) {
145145 let optionsString = '' ;
146146 _ . forEach ( docs . options , ( options , group ) => {
147- optionsString = `### ${ group } \n\nOption | Default | Description\n--------- | ----------- | -----------\n${ options } ` + optionsString ;
147+ optionsString = `### ${ group } \n\nOption | Alias | Default | Description\n--------- | --------- | ----------- | -----------\n${ options } ` + optionsString ;
148148 } ) ;
149149 if ( skeletonFileExists ) {
150150 finalFileString = finalFileString . replace ( '{{OPTIONS}}' , optionsString ) ;
Original file line number Diff line number Diff line change @@ -228,8 +228,16 @@ class Command {
228228 } ) ;
229229 description += choicesString ;
230230 }
231+ let aliases = '' ;
232+ if ( option . value . alias ) {
233+ let aliasString = '' ;
234+ _ . forEach ( option . value . alias , ( alias ) => {
235+ aliasString += `- ${ alias } ` ;
236+ } ) ;
237+ aliases += aliasString ;
238+ }
231239 const defaultValue = option . value . default || '' ;
232- res . options [ group ] += `--${ key } | ${ defaultValue } | ${ description } \n` ;
240+ res . options [ group ] += `--${ key } | ${ aliases } | ${ defaultValue } | ${ description } \n` ;
233241 } ) ;
234242
235243 res . examples = '' ;
You can’t perform that action at this time.
0 commit comments