sindresorhus / gulp-size

Display the size of your project

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Show normal and gzipped sizes together

frenzzy opened this issue · comments

[gulp] gulp-size: app.css 3.38 kB
[gulp] gulp-size: app.css 1.32 kB (gzipped)
=>
[gulp] gulp-size: app.js 3.38 kB (1.32 kB gzipped)

  • Because gulp asynс
[gulp] gulp-size: app.js 3.38 kB
[gulp] Running 'task1'...
...
[gulp] Running 'task256'...
[gulp] gulp-size: app.js 1.32 kB (gzipped)
  • Double call of plugin looks like bad
gulp.task('js', function () {
    return gulp.src('src/js/**/*.js')
        .pipe(concat('app.js'))
        .pipe(uglify())
        .pipe(size({showFiles: true}))
        .pipe(size({showFiles: true, gzip: true})) // hmm
        .pipe(gulp.dest('dist/js'));
});
  • One plugin (one of its call) should solve one problem and do it well
[gulp] gulp-size: app.js 3.38 kB (1.32 kB gzipped)

One plugin (one of its call) should solve one problem and do it well

And it does. There's no good practical reason I can think of to show both.

I agree with showing both.

+1 for displaying both