@@ -59,6 +59,7 @@ function emptyDir(dir) {
5959
6060
6161async function init ( ) {
62+ const start = Date . now ( ) ;
6263 const argTargetDir = formatTargetDir ( argv . _ [ 0 ] ) ;
6364 let targetDir = argTargetDir || defaultTargetDir ;
6465
@@ -124,15 +125,32 @@ async function init() {
124125 }
125126 console . log ( data ) ;
126127
127- // console.log(`\nScaffolding project in ${root}`);
128-
129- console . log ( chalk . green ( '\nInstalling dependencies...' ) ) ;
128+ console . log ( chalk . blue ( '\nInstalling dependencies...\n' ) ) ;
130129
131130 sh . exec (
132- `cd ${ path . basename ( root ) } && npm install`
131+ `cd ${ path . basename ( root ) } && npm install && clear `
133132 ) ;
134- console . log ( chalk . green ( `\n You can start the project with:` ) ) ;
135- console . log ( chalk . green ( `\n npm run dev` ) ) ;
133+
134+ const end = Date . now ( ) ;
135+ console . log ( `\n ✨ Done in ${ ( end - start ) / 1000 } s\n` ) ;
136+
137+ console . log ( `Success!` )
138+ console . log ( `Inside that directory, you can run several commands:\n` )
139+
140+ console . log ( ` ${ chalk . blue ( 'npm run dev' ) } ` )
141+ console . log ( ` Starts the development server.\n` )
142+
143+ console . log ( ` ${ chalk . blue ( 'npm run build' ) } ` )
144+ console . log ( ` Bundles the component inro static files for production.\n` )
145+
146+ console . log ( ` ${ chalk . blue ( 'npm run test' ) } ` )
147+ console . log ( ` Starts the test runner.\n` )
148+
149+ console . log ( ` We suggest that you begin by typing:\n` ) ;
150+ console . log ( ` ${ chalk . blue ( `\n cd` ) } ${ path . basename ( root ) } ` ) ;
151+ console . log ( ` ${ chalk . blue ( `\n npm run dev` ) } \n` ) ;
152+
153+ console . log ( 'Happy hacking!' ) ;
136154 } ) ;
137155}
138156
0 commit comments