node package manager
Easy sharing. Manage teams and permissions with one click. Create a free org »

sc-file-sizes

sc-file-sizes

Outputs a YAML file with the sizes of the gzipped and minified CSS and JS for our ads

Install

$ npm install --save-dev sc-file-sizes

Usage

Here's a simple use case - see the Platform's gulpfile for how we're using it (minification is handled separately as part of a parent gulp task). Note that you can pass it a path, or it will write to config/file_sizes.yml:

var gulp = require('gulp');
var filesizes = require('sc-file-sizes');
 
gulp.task('filesizes', function () {
    return gulp.src('./dist/*')
        .pipe(filesizes({path: 'path/to/file.yml'}));
});