Skip to content

Commit 56bdf15

Browse files
committed
[Project] Update gulp print
1 parent 1d8d3ca commit 56bdf15

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

gulp/web.js

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,23 @@ const gulp = require('gulp');
1111
const webpack = require('webpack');
1212
const WebpackDevServer = require('webpack-dev-server');
1313

14+
const webpackToStringOptions = {
15+
colors: {
16+
level: 1,
17+
hasBasic: true,
18+
has256: false,
19+
has16m: false,
20+
},
21+
cached: false,
22+
cachedAssets: false,
23+
modules: true,
24+
chunks: false,
25+
reasons: false,
26+
errorDetails: false,
27+
chunkOrigins: false,
28+
exclude: ['node_modules'],
29+
};
30+
1431
/* ************************************* */
1532
/* ******** PRIVATE FUNCTIONS ******** */
1633
/* ************************************* */
@@ -26,7 +43,7 @@ gulp.task('web:build:dev', (done) => {
2643
return done(err);
2744
}
2845

29-
console.log(stats.toString());
46+
console.log(stats.toString(webpackToStringOptions));
3047
done();
3148
});
3249
});
@@ -37,7 +54,7 @@ gulp.task('web:build:prod', (done) => {
3754
return done(err);
3855
}
3956

40-
console.log(stats.toString());
57+
console.log(stats.toString(webpackToStringOptions));
4158
done();
4259
});
4360
});
@@ -65,6 +82,6 @@ gulp.task('web:serve', (done) => {
6582
done(err);
6683
return;
6784
}
68-
console.log('==> Listening on http://localhost:8080');
85+
console.log('\n==> Webpack Listening on http://localhost:8080\n');
6986
});
7087
});

0 commit comments

Comments
 (0)