File tree Expand file tree Collapse file tree 2 files changed +16
-7
lines changed
packages/create-webpack-app/src/utils Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -28,12 +28,21 @@ const typeDisplay: Record<string, Color | string> = {
2828} ;
2929
3030function onSuccessHandler ( change : PlopActionHooksChanges ) : void {
31- change . path . split ( "\n" ) . forEach ( ( line ) => {
32- const [ operationType = "" , renderPath = "" ] = line . split ( "|" ) as [ string , string ] ;
33- console . log (
34- `\t${ typeDisplay [ operationType ] } ${ normalize ( relative ( process . cwd ( ) , renderPath ) ) } ` ,
35- ) ;
36- } ) ;
31+ switch ( change . type ) {
32+ case "fileGenerator" : {
33+ change . path . split ( "\n" ) . forEach ( ( line ) => {
34+ const [ operationType = "" , renderPath = "" ] = line . split ( "|" ) ;
35+ console . log (
36+ `\t${ typeDisplay [ operationType ] } ${ normalize ( relative ( process . cwd ( ) , renderPath ) ) } ` ,
37+ ) ;
38+ } ) ;
39+ break ;
40+ }
41+ case "pkgInstall" : {
42+ logger . success ( change . path ) ;
43+ break ;
44+ }
45+ }
3746}
3847
3948function onFailureHandler ( failure : PlopActionHooksFailures ) : void {
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ export default async function (plop: NodePlopAPI) {
3030
3131 // promise to complete subprocess of installing packages and return a message
3232 const returnPromise : Promise < string > = new Promise ( ( resolve , reject ) => {
33- const returnMessage = `Project Dependencies installed successfully` ;
33+ const returnMessage = `Project dependencies installed successfully! ` ;
3434 const packageManager = answers . packageManager ;
3535 const packages = config . packages . length == 1 ? [ config . packages [ 0 ] ] : config . packages ;
3636 const installOptions : Record < string , Array < string > > = {
You can’t perform that action at this time.
0 commit comments