New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@mokahr/gulp-revision-hash

Package Overview
Dependencies
Maintainers
5
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mokahr/gulp-revision-hash

gulp add version to file name and create a manifest.son file

1.1.1
latest
npm
Version published
Maintainers
5
Created
Source

gulp-revision-hash

inspired by gulp-rev add content hash to asset filenames like: xxx.js => xxx_aobusk12soi3.js

install

$ npm install --save-dev gulp-revision-hash

usage

add content hash to filenames

const gulp = require('gulp');
const rev = require('gulp-revision-hash');

exports.default = () => (
	gulp.src('src/*.js')
		.pipe(rev())
    .pipe(gulp.dest('dist'))
    .pipe(rev.manifest('manifest.json'))
    .pipe(gulp.dest('dist'));
);

create a simple hash

const hash = rev.getCommonHash('any string');

API

rev(hash)

hash

Type: string

Default: radom hash

ref.manifest(path)

path

Type: string

Default: manifest.json

rev.getCommonHash(hashString)

hashString

Type: string

Default: Date.now()

Keywords

gulp

FAQs

Package last updated on 29 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts