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
- Host: GitHub
- URL: https://github.com/sindresorhus/gulp-micro
- Owner: sindresorhus
- License: mit
- Created: 2014-01-03T14:29:47.000Z (about 12 years ago)
- Default Branch: main
- Last Pushed: 2023-11-01T16:54:01.000Z (over 2 years ago)
- Last Synced: 2024-10-29T22:38:25.395Z (over 1 year ago)
- Topics: gulp-plugin, javascript, nodejs
- Language: JavaScript
- Size: 30.3 KB
- Stars: 14
- Watchers: 6
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
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.