File tree Expand file tree Collapse file tree 1 file changed +17
-19
lines changed Expand file tree Collapse file tree 1 file changed +17
-19
lines changed Original file line number Diff line number Diff line change @@ -48,28 +48,26 @@ export default function modifyHelperUtil(
48
48
if ( action !== "init" ) {
49
49
configPath = path . resolve ( process . cwd ( ) , configFile ) ;
50
50
const webpackConfigExists : boolean = fs . existsSync ( configPath ) ;
51
+ let outputMessage =
52
+ "\n" +
53
+ logSymbols . error +
54
+ chalk . red ( " ERROR " ) +
55
+ chalk . cyan ( configFile ) +
56
+ " not found. Please specify a valid path to your webpack config like \n " +
57
+ chalk . white ( "$ " ) +
58
+ chalk . cyan ( `webpack-cli ${ action } webpack.dev.js` ) +
59
+ "\n" ;
51
60
if ( webpackConfigExists ) {
52
- process . stdout . write (
61
+ outputMessage =
53
62
"\n" +
54
- logSymbols . success +
55
- chalk . green ( " SUCCESS " ) +
56
- "Found config " +
57
- chalk . cyan ( configFile + "\n" ) +
58
- "\n"
59
- ) ;
60
- } else {
61
- process . stdout . write (
62
- "\n" +
63
- logSymbols . error +
64
- chalk . red ( " ERROR " ) +
65
- chalk . cyan ( configFile ) +
66
- " not found. Please specify a valid path to your webpack config like \n " +
67
- chalk . white ( "$ " ) +
68
- chalk . cyan ( `webpack-cli ${ action } webpack.dev.js` ) +
69
- "\n"
70
- ) ;
71
- return ;
63
+ logSymbols . success +
64
+ chalk . green ( " SUCCESS " ) +
65
+ "Found config " +
66
+ chalk . cyan ( configFile + "\n" ) +
67
+ "\n" ;
72
68
}
69
+ process . stdout . write ( outputMessage ) ;
70
+ return ;
73
71
}
74
72
75
73
const env = yeoman . createEnv ( "webpack" , null ) ;
You can’t perform that action at this time.
0 commit comments