node package manager
It’s your turn. Help us improve JavaScript. Take the 2017 JavaScript Ecosystem Survey »

gulp-micro

gulp-micro Build Status

Ensure your micro-lib stays micro

Useful when paired with Travis CI to verify that all pull-requests are within the size limit.

Install

$ npm install --save-dev gulp-micro

Usage

const gulp = require('gulp');
const micro = require('gulp-micro');
 
gulp.task('default', () =>
    gulp.src('src/app.js')
        .pipe(micro({limit: 1000}))
        .pipe(gulp.dest('dist'))
);

Options

Type: Object

limit

Required
Type: number

File size limit in bytes.

Tip

Place gulp-gzip before this plugin to limit the gzipped size.

License

MIT © Sindre Sorhus