File tree 2 files changed +16
-7
lines changed
packages/create-webpack-app/src/utils
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> = {
28
28
} ;
29
29
30
30
function 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
+ }
37
46
}
38
47
39
48
function onFailureHandler ( failure : PlopActionHooksFailures ) : void {
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ export default async function (plop: NodePlopAPI) {
30
30
31
31
// promise to complete subprocess of installing packages and return a message
32
32
const returnPromise : Promise < string > = new Promise ( ( resolve , reject ) => {
33
- const returnMessage = `Project Dependencies installed successfully` ;
33
+ const returnMessage = `Project dependencies installed successfully! ` ;
34
34
const packageManager = answers . packageManager ;
35
35
const packages = config . packages . length == 1 ? [ config . packages [ 0 ] ] : config . packages ;
36
36
const installOptions : Record < string , Array < string > > = {
You can’t perform that action at this time.
0 commit comments