File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -328,7 +328,27 @@ module.exports = {
328328 console . log ( chalk . yellow ( '----------------------------------------------------' ) ) ;
329329 console . log ( chalk . yellow ( 'Available Templates' ) ) ;
330330 console . log ( chalk . yellow ( '----------------------------------------------------' ) ) ;
331- console . log ( templateList . join ( '\n' ) ) ;
331+
332+ var longestTemplateLength = 0 ;
333+ for ( var i = 0 ; i < templateList . length ; i ++ ) {
334+ if ( templateList [ i ] . length > longestTemplateLength ) {
335+ longestTemplateLength = templateList [ i ] . length ;
336+ }
337+ }
338+ for ( var i = 0 ; i < templateList . length ; i ++ ) {
339+ var key = templateList [ i ] ,
340+ template = supportedTemplates [ key ] ;
341+ var output = chalk . bold ( key ) ;
342+ if ( template . description ) {
343+ var spacingString = '' ;
344+ for ( var j = longestTemplateLength ; j > key . length ; j -- ) {
345+ spacingString += ' ' ;
346+ }
347+ output += spacingString + ' - ' + template . description ;
348+ }
349+ console . log ( output ) ;
350+ }
351+
332352 console . log ( chalk . yellow ( '----------------------------------------------------' ) ) ;
333353 console . log ( 'Choose a template to help you get started with your app' ) ;
334354 }
You can’t perform that action at this time.
0 commit comments