node package manager
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »



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


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


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'}));