File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 installDependencies ,
88 installDevDependencies ,
99 createTSConfig ,
10+ displaySuccessMessage ,
1011} from "./init" ;
1112import { handleIncorrectApplicationName } from "./program" ;
1213
@@ -47,6 +48,8 @@ const main = async (): Promise<void> => {
4748 await copyTemplateFiles ( applicationName ) ;
4849
4950 await createTSConfig ( applicationName ) ;
51+
52+ displaySuccessMessage ( applicationName ) ;
5053} ;
5154
5255export default main ;
Original file line number Diff line number Diff line change @@ -151,3 +151,28 @@ export const createTSConfig = async (
151151 console . error ( error ) ;
152152 }
153153} ;
154+
155+ export const displaySuccessMessage = ( applicationName : string ) : void => {
156+ const root = path . resolve ( applicationName ) ;
157+
158+ console . log ( ) ;
159+ console . log (
160+ `${ chalk . greenBright ( "Success!" ) } Created ${ chalk . yellowBright (
161+ applicationName
162+ ) } at ${ chalk . yellowBright ( root ) } `
163+ ) ;
164+ console . log ( "Inside that directory, you can run several commands:" ) ;
165+ console . log ( ) ;
166+ console . log ( chalk . cyan ( ` npm run build` ) ) ;
167+ console . log ( " Creates a local build." ) ;
168+ console . log ( ) ;
169+ console . log ( chalk . cyan ( ` npm start` ) ) ;
170+ console . log ( " Starts the application in the terminal." ) ;
171+ console . log ( ) ;
172+ console . log ( "We suggest that you begin by typing:" ) ;
173+ console . log ( ) ;
174+ console . log ( chalk . cyan ( " cd" ) , root ) ;
175+ console . log ( ` ${ chalk . cyan ( `npm run build && npm start` ) } ` ) ;
176+ console . log ( ) ;
177+ console . log ( chalk . yellowBright ( "Happy CLI creating!" ) ) ;
178+ } ;
You can’t perform that action at this time.
0 commit comments