@@ -2,30 +2,30 @@ const angularApplication = require('./applications/application.angular');
22const reactApplication = require ( './applications/application.react' ) ;
33const nextjsApplication = require ( './applications/application.nextjs' ) ;
44const vueApplication = require ( './applications/application.vue' ) ;
5- const getReactAppType = require ( './utility/prompts/app-type' ) ;
5+ const getReactAppType = require ( './utility/prompts/react- app-type' ) ;
66const printHelp = require ( './help' ) . printHelp ;
77
88const isApplicationCommand = ( command ) => {
99 return [ 'new' , 'add' ] . includes ( command ) ;
1010} ;
1111
12- const handleWrongAppType = ( input , command ) => {
13- console . error ( `The '${ input } ' application type is not valid` ) ;
12+ const handleWrongAppType = ( appType , command ) => {
13+ console . error ( `The '${ appType } ' application type is not valid` ) ;
1414 printHelp ( command ) ;
1515} ;
1616
1717const createReact = async ( appName , options , command ) => {
18- const appType = await getReactAppType ( options [ 'app-type' ] ) ;
18+ const reactAppType = await getReactAppType ( options [ 'app-type' ] ) ;
1919
20- switch ( appType ) {
20+ switch ( reactAppType ) {
2121 case 'vite' :
2222 await reactApplication . create ( appName , options ) ;
2323 return ;
2424 case 'nextjs' :
2525 await nextjsApplication . create ( appName , options ) ;
2626 return ;
2727 default :
28- handleWrongAppType ( appType , command ) ;
28+ handleWrongAppType ( reactAppType , command ) ;
2929 }
3030} ;
3131
0 commit comments