Skip to content

Commit 0513269

Browse files
committed
fix: 去掉冗余 pack log
1 parent 5ca9685 commit 0513269

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

lib/models/Project.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,9 @@ var Project = function () {
374374
errorDetails: false
375375
});
376376

377-
process.stdout.write("\x1b[90m" + '-------------------------- YKIT PACKED ASSETS -------------------------- ' + "\x1b[0m \n\n");
377+
process.stdout.write(
378+
// clear bundle log
379+
' \n' + '\x1b[90m' + '-------------------------- YKIT PACKED ASSETS -------------------------- ' + '\x1b[0m \n\n');
378380

379381
if (statsInfo.errors.length > 0) {
380382
statsInfo.errors.map(function (err) {
@@ -391,7 +393,7 @@ var Project = function () {
391393
statsInfo.assets.map(function (asset) {
392394
var size = asset.size > 1024 ? (asset.size / 1024).toFixed(2) + ' kB' : asset.size + ' bytes';
393395
if (!/\.cache$/.test(asset.name)) {
394-
log('packed asset: '.gray + asset.name + ' - ' + size);
396+
log('- '.gray + asset.name + ' - ' + size);
395397
}
396398
});
397399
info();

src/models/Project.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,9 +340,11 @@ class Project {
340340
});
341341

342342
process.stdout.write(
343-
"\x1b[90m"
343+
// clear bundle log
344+
' \n'
345+
+ '\x1b[90m'
344346
+ '-------------------------- YKIT PACKED ASSETS -------------------------- '
345-
+ "\x1b[0m \n\n"
347+
+ '\x1b[0m \n\n'
346348
)
347349

348350
if (statsInfo.errors.length > 0) {
@@ -362,7 +364,7 @@ class Project {
362364
(asset.size / 1024).toFixed(2) + ' kB' :
363365
asset.size + ' bytes';
364366
if (!/\.cache$/.test(asset.name)) {
365-
log('packed asset: '.gray + asset.name + ' - ' + size);
367+
log('- '.gray + asset.name + ' - ' + size);
366368
}
367369
})
368370
info();

0 commit comments

Comments
 (0)