# gulp-sha256-filename

> gulp-sha256-filename is a gulp plug-in rename file with sha256.

Latest version **2.0.0** (published 2019-02-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install gulp-sha256-filename
pnpm add gulp-sha256-filename
yarn add gulp-sha256-filename
bun add gulp-sha256-filename
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2019-02-06 |
| First published | 2019-02-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 8.0.0 |
| Dependencies | 0 |
| Unpacked size | 14.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Wilmer H. Muñoz |
| Maintainers | wilmerhmg |
| Keywords | gulp, gulpplugin, JavaScript, sha256 |

## Links

- npm: https://www.npmjs.com/package/gulp-sha256-filename
- Repository: https://github.com/Dev-Wito/gulp-sha256-filename
- Issues: https://github.com/Dev-Wito/gulp-sha256-filename/issues
- npm.io page: https://npm.io/package/gulp-sha256-filename

## Recent versions

- 2.0.0 (latest) — 2019-02-06
- 1.1.1 — 2019-02-06
- 1.0.4 — 2019-02-06
- 1.0.3 — 2019-02-06
- 1.0.2 — 2019-02-06
- 1.0.1 — 2019-02-05
- 0.0.1-security — 2019-02-05

## README

# Usage of gulp-sha256-filename
[![NPM version](https://img.shields.io/npm/v/gulp-sha256-filename.svg)](https://npmjs.org/package/gulp-sha256-filename)
[![Downloads](https://img.shields.io/npm/dm/gulp-sha256-filename.svg)](https://npmjs.org/package/gulp-sha256-filename)
[![Build Status](https://travis-ci.org/Dev-Wito/gulp-sha256-filename.svg?branch=master)](https://travis-ci.org/Dev-Wito/gulp-sha256-filename)
[![Coverage Status](https://coveralls.io/repos/github/Dev-Wito/gulp-sha256-filename/badge.svg?branch=master)](https://coveralls.io/github/Dev-Wito/gulp-sha256-filename?branch=master)

It's plugin for gulp rename file output with sha256 hash sum.

## Installation

````
npm i gulp-sha256-filename
````
or
```
npm i -D gulp-sha256-filename
```

## Example of the hash() function

Here is an example of how to use the hash() function in your gulpfile.js file:

```js
const gulp = require('gulp');
const hash = require('gulp-sha256-filename');

gulp.task('assemble', function() {
return gulp.src('./assembly.json')
	.pipe(hash())
	.pipe(gulp.dest('./dist'))
});
```

### Filename custom format
You can set a custom format for filename.
```js
const gulp = require('gulp');
const hash = require('gulp-sha256-filename');

gulp.task('assemble', function() {
return gulp.src('./assembly.json')
	.pipe(hash({
		format:"{name}.{hash}{ext}"
	}))
	.pipe(gulp.dest('./dist'))
});
```
and set limit length at hash
```js
const gulp = require('gulp');
const hash = require('gulp-sha256-filename');

gulp.task('assemble', function() {
return gulp.src('./assembly.json')
	.pipe(hash({
		format:"{name}.{hash:8}{ext}"
	}))
	.pipe(gulp.dest('./dist'))
});
```

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