@@ -23,9 +23,9 @@ module.exports = function(hostPath, appName) {
2323
2424 // Setup the script rules
2525 hostPackage . scripts = { } ;
26- [ 'start' , 'build' ] . forEach ( function ( command ) {
26+ [ 'start' , 'build' , 'graduate' ] . forEach ( function ( command ) {
2727 hostPackage . scripts [ command ] =
28- 'node node_modules/create-react-app-scripts/scripts/' + command + '.js ' ;
28+ command + '-react-app ' ;
2929 } ) ;
3030
3131 fs . writeFileSync ( hostPath + '/package.json' , JSON . stringify ( hostPackage , null , 2 ) ) ;
@@ -35,5 +35,16 @@ module.exports = function(hostPath, appName) {
3535 // Move the src folder
3636 fs . renameSync ( selfPath + '/src' , hostPath + '/src' ) ;
3737
38- console . log ( 'Creating the app' , appName , 'at' , hostPath ) ;
38+ console . log ( 'Success! Created ' + appName + ' at ' + hostPath + '.' ) ;
39+ console . log ( ) ;
40+ console . log ( 'Inside that directory, you can run several commands:' ) ;
41+ console . log ( ' * npm start: Starts the development server.' ) ;
42+ console . log ( ' * npm run build: Builds the app for production.' ) ;
43+ console . log ( ' * npm run graduate: Removes this tool. If you do this, you can’t go back!' ) ;
44+ console . log ( ) ;
45+ console . log ( 'We suggest that you begin by typing:' ) ;
46+ console . log ( ' cd' , appName ) ;
47+ console . log ( ' npm start' ) ;
48+ console . log ( ) ;
49+ console . log ( 'Happy hacking!' ) ;
3950} ;
0 commit comments