This repository was archived by the owner on Dec 16, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -210,6 +210,7 @@ async function getConfig() {
210210 return {
211211 ...config ,
212212 libraryVersion,
213+ name : config . name || appName ,
213214 template : templatePath ,
214215 } ;
215216}
Original file line number Diff line number Diff line change 1+ const path = require ( 'path' ) ;
12const chalk = require ( 'chalk' ) ;
23const { isYarnAvailable } = require ( '../../shared/utils' ) ;
34
@@ -7,18 +8,21 @@ module.exports = function teardown(config) {
78 const hasYarn = isYarnAvailable ( ) ;
89 const installCommand = hasYarn ? 'yarn' : 'npm install' ;
910 const startCommand = hasYarn ? 'yarn start' : 'npm start' ;
11+ const currentDirectory = process . cwd ( ) ;
12+ const cdPath =
13+ path . join ( currentDirectory , config . name ) === config . path
14+ ? config . name
15+ : config . path ;
1016
1117 console . log ( ) ;
1218 console . log (
13- `🎉 Created ${ chalk . bold . cyan ( config . name ) } at ${ chalk . green (
14- config . path
15- ) } .`
19+ `🎉 Created ${ chalk . bold . cyan ( config . name ) } at ${ chalk . green ( cdPath ) } .`
1620 ) ;
1721 console . log ( ) ;
1822
1923 console . log ( 'Begin by typing:' ) ;
2024 console . log ( ) ;
21- console . log ( ` ${ chalk . cyan ( 'cd' ) } ${ config . path } ` ) ;
25+ console . log ( ` ${ chalk . cyan ( 'cd' ) } ${ cdPath } ` ) ;
2226
2327 if ( config . installation === false ) {
2428 console . log ( ` ${ chalk . cyan ( `${ installCommand } ` ) } ` ) ;
You can’t perform that action at this time.
0 commit comments