# gulp-md5

> add md5 to filename

Latest version **0.1.3** (published 2020-07-12) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2020-07-12 |
| First published | 2014-05-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 3.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 14 |
| Author | gaok |
| Maintainers | raistlin916 |
| Keywords | gulp, gulp-md5 |

## Links

- npm: https://www.npmjs.com/package/gulp-md5
- Repository: https://github.com/Raistlin916/gulp-md5
- Homepage: https://github.com/Raistlin916/gulp-md5.git
- Issues: https://github.com/Raistlin916/gulp-md5/issues
- npm.io page: https://npm.io/package/gulp-md5

## Dependencies (3)

- [through2](https://npm.io/package/through2.md) ^0.4.1
- [fancy-log](https://npm.io/package/fancy-log.md) ~1.3.3
- [plugin-error](https://npm.io/package/plugin-error.md) ~1.0.1

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 0.1.3 (latest) — 2020-07-12
- 0.1.2 — 2016-02-10
- 0.1.1 — 2015-04-17
- 0.1.0 — 2014-09-25
- 0.0.1 — 2014-05-22
- 0.0.0 — 2014-05-22

## README

[![NPM](https://nodei.co/npm/gulp-md5.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/gulp-md5/)
[![NPM](https://nodei.co/npm-dl/gulp-md5.png?months=9&height=3)](https://nodei.co/npm/gulp-md5/)

# gulp-md5

> md5 plugin for [gulp](https://github.com/wearefractal/gulp).

## Usage

First, install `gulp-md5` as a development dependency:

```shell
npm install --save-dev gulp-md5
```

Then, add it to your `gulpfile.js`:

```javascript
var md5 = require("gulp-md5");

gulp.src("./src/*.ext")
	.pipe(md5({
		msg: "Hello Gulp!"
	}))
	.pipe(gulp.dest("./dist"));
```

## API

### md5({printOnly: True})

#### printOnly
Type: `Boolean`  
Default: false

Optional: you can pass printOnly to skip md5 appending to filenames and just print md5 of file to console.

### md5({separator: '_'})

#### separator
Type: `String`  
Default: '_'

Optional: you can pass other separator like '-'.

### md5(size)

#### size
Type: `String`  
Default: null

Optionnal: you can pass the size to limit the size of the hash that is appended.

Example:
```javascript
	gulp.src('**/*', {
        cwd: './src'
    })
        .pipe(md5())
        .pipe(gulp.dest('./whatever'));
```

The sample above will append the full md5 hash to each of the file matching src and store all of that into the *whatever* folder.

```shell
whatever/
├── index_a7ded4c00cdc9cdc47e55f6b85e3f909.html
├── app_6b85e3f9096b85e3f9096b85e3f90943.js
├── ...
```

If you pass the size argument, the hash will be truncated to that value. For instance md5(10) will produce:

```shell
whatever/
├── index_a7ded4c00c.html
├── app_6b85e3f909.js
├── ...
```

## License

http://en.wikipedia.org/wiki/MIT_License[MIT License]

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