# gulp-min

> 压缩js,css,图片

Latest version **0.0.2** (published 2014-09-24) · 0 weekly downloads

## Install

```sh
npm install gulp-min
pnpm add gulp-min
yarn add gulp-min
bun add gulp-min
```

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2014-09-24 |
| First published | 2014-08-20 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.9 |
| Dependencies | 5 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | ruting.yangrt |
| Maintainers | yangruting |
| Keywords | gulpplugin, minify |

## Links

- npm: https://www.npmjs.com/package/gulp-min
- Homepage: http://gitlab.alibaba-inc.com/ruting.yangrt/gulp-minify
- Issues: http://gitlab.alibaba-inc.com/ruting.yangrt/gulp-minify/issues
- npm.io page: https://npm.io/package/gulp-min

## Dependencies (5)

- [fileutil](https://npm.io/package/fileutil.md) ~1.0.0
- [through2](https://npm.io/package/through2.md) ~0.4.2
- [gulp-util](https://npm.io/package/gulp-util.md) ^2.2.14
- [event-stream](https://npm.io/package/event-stream.md) ~3.0.18
- [node-minifier](https://npm.io/package/node-minifier.md) 0.2.0

## Recent versions

- 0.0.2 (latest) — 2014-09-24
- 0.0.1 — 2014-08-20

## README

# gulp-minify


### 使用示例

> `gulp-minify`可以压缩js脚本，css样式，html文档，json数据，jpg、png和gif图片

> `gulp-minify`压缩原理基于：node-minifier,github地址：https://github.com/colorhook/node-minifier

#### 压缩

```js
var minify = require('gulp-minify');
gulp.task('js', function () {
    return gulp.src('src/**/*.js')
        .pipe(code.lint())
        .pipe(code.dep({
            name: pkg.name,
            path: 'http://g.tbcdn.cn/tm/detail/' + pkg.version,
            depFile: ['seed.js']
        }))
        .pipe(minify())
        .pipe(gulp.dest('build/'))
});
```

#### 压缩css并且图片进行datauri

```js
var minify = require('gulp-minify');
gulp.task('css', function () {
    return gulp.src('src/**/*.css')
        .pipe(code.lint())
        .pipe(minify({"datauri": true}))
        .pipe(gulp.dest('build/'))
});
```

---
_Source: https://npm.io/package/gulp-min · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
