@@ -5,7 +5,7 @@ const { Spinner } = require("cli-spinner");
55
66const { packages, features } = require ( "./packages" ) ;
77const { schema } = require ( "./schema" ) ;
8- const { print, bold, dim, highlight, underline, actions, runActions, isYes } = require ( "./utilities" ) ;
8+ const { print, bold, dim, highlight, underline, actions, runActions, isYes, printFeatureConf } = require ( "./utilities" ) ;
99
1010const spinner = new Spinner ( "%s Installing the new modules..." ) . setSpinnerString ( 18 ) ;
1111
@@ -17,12 +17,12 @@ const spinner = new Spinner("%s Installing the new modules...").setSpinnerString
1717const startPrompt = project =>
1818 new Promise ( ( res , rej ) => {
1919 print (
20- `${ dim ( ` ${ bold ( "Thanks for using React Boilerplate." ) }
20+ `${ bold ( "Thanks for using React Boilerplate. ❤️ " ) }
2121If you run into trouble, don't hesitate to write an issue or contact one of the maintainers.
2222
23- Make sure that you don't have any uncommited changes before running the yarn setup .
23+ Make sure you don't have any uncommited changes before running, as it will stage any changes .
2424
25- ${ bold ( "Github Link" ) }
25+ ${ dim ( ` ${ bold ( "Github Link" ) }
2626${ underline ( "https://github.com/adaptdk/react_boilerplate/issues" ) }
2727
2828${ bold ( "Maintainers" ) }
@@ -75,7 +75,7 @@ const getProjectName = project =>
7575const getPackages = project =>
7676 new Promise ( ( res , rej ) => {
7777 print ( "------" , "dim" , [ 2 , 0 ] ) ;
78- print ( `🌲 Now, this is the available packages:` , null , [ 2 , 0 ] ) ;
78+ print ( `Available packages:` , "bold" , [ 2 , 0 ] ) ;
7979 print (
8080 `Read more about the different packages at ${ underline (
8181 "https://github.com/adaptdk/react_boilerplate#-packages"
@@ -86,7 +86,14 @@ const getPackages = project =>
8686
8787 // Output Each Package
8888 packages . forEach ( variant => {
89- print ( `${ variant . id } ${ variant . title } ` ) ;
89+ switch ( variant . type ) {
90+ case "break" :
91+ print ( variant . title , "bold" , [ 1 , 0 ] ) ;
92+ break ;
93+ default :
94+ print ( ` ${ variant . id } ${ variant . title } ` ) ;
95+ break ;
96+ }
9097 } ) ;
9198
9299 print ( `${ bold ( "📦 Which package do you want to install?" ) } ` , null , [ 2 , 0 ] ) ;
@@ -137,8 +144,9 @@ const getFeatures = project =>
137144 prompt . get ( schema . features , ( err , result ) => {
138145 if ( result ) {
139146 if ( isYes ( result . features ) ) {
147+ // If they want to customize and change the options
148+ project . customizeFeature = true ;
140149 const { features : selectedFeatures } = project ;
141-
142150 selectedFeatures . forEach ( async ( selectedFeature , featuresIndex ) => {
143151 let activeFeatureIndex ;
144152 const activeFeature = features . find ( ( feature , featureIndex ) => {
@@ -267,15 +275,19 @@ Thank you for using the boilerplate for your React project. 💪`);
267275 print (
268276 `
269277 ${ bold ( "Project overview:" ) }
270- ${ bold ( "✏️ Title:" ) } ${ project . title }
271278 ${ bold ( "✏️ Machine name:" ) } ${ project . machine }
279+ ${ bold ( "✏️ Title:" ) } ${ project . title }
272280 ${ bold ( "📦 Package:" ) } ${ project . package . branch } ` ,
273281 null ,
274282 [ 1 , 0 ]
275283 ) ;
276284 if ( setupConf . hasRepo ) {
277285 print ( ` ${ bold ( "🌲 Repo Url:" ) } ${ project . ownRepo } ` ) ;
278286 }
287+ if ( setupConf . hasFeatures && project . customizeFeature ) {
288+ print ( " 💎 Features:" , "bold" , [ 0 , 1 ] ) ;
289+ printFeatureConf ( project . features ) ;
290+ }
279291
280292 print (
281293 `${ bold ( "Here's some quick commands to get you started." ) }
0 commit comments