An open API service indexing awesome lists of open source software.

https://github.com/sindresorhus/gulp-micro

Ensure your micro-lib stays micro
https://github.com/sindresorhus/gulp-micro

gulp-plugin javascript nodejs

Last synced: 11 months ago
JSON representation

Ensure your micro-lib stays micro

Awesome Lists containing this project

README

          

# gulp-micro

> Ensure your micro-lib stays micro

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

## Install

```sh
npm install --save-dev gulp-micro
```

## Usage

```js
import gulp from 'gulp';
import micro from 'gulp-micro';

export default () => (
gulp.src('src/app.js')
.pipe(micro({limit: 1000}))
.pipe(gulp.dest('dist'))
);
```

## API

## micro(options?)

### options

Type: `object`

#### limit

*Required*\
Type: `number`

File size limit in bytes.

## Tip

Place [gulp-gzip](https://github.com/jstuckey/gulp-gzip) before this plugin to limit the gzipped size.