Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfca8c00

Browse files
fix: logging
1 parent09c7cd7 commitfca8c00

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

‎packages/create-webpack-app/src/utils/logger.ts‎

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,21 @@ const typeDisplay: Record<string, Color | string> = {
2828
};
2929

3030
functiononSuccessHandler(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

3948
functiononFailureHandler(failure:PlopActionHooksFailures):void{

‎packages/create-webpack-app/src/utils/pkgInstallAction.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
constreturnPromise:Promise<string>=newPromise((resolve,reject)=>{
33-
constreturnMessage=`ProjectDependencies installed successfully`;
33+
constreturnMessage=`Projectdependencies installed successfully!`;
3434
constpackageManager=answers.packageManager;
3535
constpackages=config.packages.length==1 ?[config.packages[0]] :config.packages;
3636
constinstallOptions:Record<string,Array<string>>={

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp