@@ -38,28 +38,38 @@ async function writeFiles(environment: Environment, options: Options) {
3838 }
3939 }
4040
41+ environment . startStep ( 'Writing framework files...' )
4142 await writeFileBundle ( options . framework )
43+ environment . finishStep ( 'Framework files written' )
4244
4345 for ( const type of [ 'add-on' , 'example' , 'toolchain' ] ) {
4446 for ( const phase of [ 'setup' , 'add-on' , 'example' ] ) {
4547 for ( const addOn of options . chosenAddOns . filter (
4648 ( addOn ) => addOn . phase === phase && addOn . type === type ,
4749 ) ) {
50+ environment . startStep ( `Writing ${ addOn . name } files...` )
4851 await writeFileBundle ( addOn )
52+ environment . finishStep ( `${ addOn . name } files written` )
4953 }
5054 }
5155 }
5256
5357 if ( options . starter ) {
58+ environment . startStep ( `Writing starter files...` )
5459 await writeFileBundle ( options . starter )
60+ environment . finishStep ( `Starter files written` )
5561 }
5662
63+ environment . startStep ( `Writing package.json...` )
5764 await environment . writeFile (
5865 resolve ( options . targetDir , './package.json' ) ,
5966 JSON . stringify ( createPackageJSON ( options ) , null , 2 ) ,
6067 )
68+ environment . finishStep ( `package.json written` )
6169
70+ environment . startStep ( `Writing config file...` )
6271 await writeConfigFile ( environment , options . targetDir , options )
72+ environment . finishStep ( `Config file written` )
6373}
6474
6575async function runCommandsAndInstallDependencies (
@@ -71,17 +81,25 @@ async function runCommandsAndInstallDependencies(
7181 // Setup git
7282 if ( options . git ) {
7383 s . start ( `Initializing git repository...` )
84+ environment . startStep ( `Initializing git repository...` )
85+
7486 await setupGit ( environment , options . targetDir )
87+
88+ environment . finishStep ( `Initialized git repository` )
7589 s . stop ( `Initialized git repository` )
7690 }
7791
7892 // Install dependencies
7993 s . start ( `Installing dependencies via ${ options . packageManager } ...` )
94+ environment . startStep (
95+ `Installing dependencies via ${ options . packageManager } ...` ,
96+ )
8097 await packageManagerInstall (
8198 environment ,
8299 options . targetDir ,
83100 options . packageManager ,
84101 )
102+ environment . finishStep ( `Installed dependencies` )
85103 s . stop ( `Installed dependencies` )
86104
87105 for ( const phase of [ 'setup' , 'add-on' , 'example' ] ) {
@@ -90,11 +108,13 @@ async function runCommandsAndInstallDependencies(
90108 addOn . phase === phase && addOn . command && addOn . command . command ,
91109 ) ) {
92110 s . start ( `Setting up ${ addOn . name } ...` )
111+ environment . startStep ( `Setting up ${ addOn . name } ...` )
93112 await environment . execute (
94113 addOn . command ! . command ,
95114 addOn . command ! . args || [ ] ,
96115 options . targetDir ,
97116 )
117+ environment . finishStep ( `${ addOn . name } setup complete` )
98118 s . stop ( `${ addOn . name } setup complete` )
99119 }
100120 }
@@ -106,11 +126,15 @@ async function runCommandsAndInstallDependencies(
106126 options . starter . command . command
107127 ) {
108128 s . start ( `Setting up starter ${ options . starter . name } ...` )
129+ environment . startStep ( `Setting up starter ${ options . starter . name } ...` )
130+
109131 await environment . execute (
110132 options . starter . command . command ,
111133 options . starter . command . args || [ ] ,
112134 options . targetDir ,
113135 )
136+
137+ environment . finishStep ( `Starter ${ options . starter . name } setup complete` )
114138 s . stop ( `Starter ${ options . starter . name } setup complete` )
115139 }
116140
0 commit comments