Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@holisticon/gulp-static-hash

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@holisticon/gulp-static-hash

A gulp plugin for cache files by adding a hash version append their name(like a.js?v=hash) or create a hash named file

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

gulp-static-hash

Build Status Build status

A gulp plugin for cache files by adding a hash version append their name(like a.js?v=hash).

Install

npm install --save-dev @holisticon/gulp-static-hash

Or if you want to use the development version (nightly build), which maybe not stable!:

npm install @holisticon/gulp-static-hash@next --save-dev

Examples

Default

var gulp = require('gulp');
var staticHash = require('gulp-static-hash');

gulp.task('static-hash-html', function () {
	gulp.src('static/**/*.html')
		.pipe(staticHash({asset: 'static'}))
		.pipe(gulp.dest('dest'));
});
Input:
<link rel="stylesheet" href="main.min.css">
<script src="main.min.js"></script>
<img src="main.png" />
Output:
<link rel="stylesheet" href="main.min.css?v=8501b2b">
<script src="main.min.js?v=8501b2b"></script>
<img src="main.png?v=8501b2b" />

Options

asset: 'static'

The path to assets in your project

exts: ['js', 'css', 'png']

The extension list need add hash version

md5BuildAsset: 'static'

The path to assets in your project used by create md5 file

Keywords

FAQs

Package last updated on 14 Feb 2017

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc