0.0.8 • Published 10 years ago

rind-hash-gulp v0.0.8

Weekly downloads
10
License
MIT
Repository
github
Last release
10 years ago

rind rind-hash-gulp npm.io

Gulp task to generate an md5 mapped directory of assets.

Given filesystem input:

├── img
│   └── rind.png
├── js
│   └── hello.js
└── txt
    └── sample.txt

Produces:

├── hash.json
├── img
│   └── rind.d6bc63f.png
├── js
│   └── hello.d81ffe3.js
└── txt
    └── sample.6f5902a.txt

Where hash.json will contain the mapping from original filename to md5'd version:

{
  "/img/rind.png": "/img/rind.d6bc63f.png",
  "/js/hello.js": "/js/hello.d81ffe3.js",
  "/txt/sample.txt": "/txt/sample.6f5902a.txt"
}

Usage

var gulp = require('gulp');
var hash = require('rind-hash-gulp');

/*
var opts = {
  cwd: // directory to glob
  output: // output directory
  hash: // path and filename for hash.json
  mapping: // if set to `dev` then hash.json will point to original files
  copy: // glob pattern of files to just copy instead of md5'ing
  symbol: // separator between file path and md5, defaults to '.'
  verbose: // output process
};
*/

gulp.task('hash', hash(gulp, opts));
0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago