gulp-rev-format
Formatting options for static revisioned assets generated by gulp-rev or gulp-git-rev: unicorn.css => unicorn[pre]d41d8cd98f[pre].css
Last updated 7 months ago by atamas101 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install gulp-rev-format 
SYNC missed versions from official npm registry.

gulp-rev-format Build Status | js-standard-style

Formatting options for static revisioned assets generated by gulp-rev or gulp-git-rev: unicorn.cssunicorn[pre]d41d8cd98f[pre].css

Make sure to set the files to never expire for this to have an effect.

Install

$ npm install --save-dev gulp-rev-format

Usage

var gulp = require('gulp');
var rev = require('gulp-rev');
var revFormat = require('gulp-rev-format');

gulp.task('default', function () {
	return gulp.src('src/*.*')
		.pipe(rev())
		.pipe(revFormat({
            prefix: '.',
            suffix: '.cache',
            lastExt: false
        }))
		.pipe(gulp.dest('dist'))
		.pipe(rev.manifest())
		.pipe(gulp.dest('dist'));
});

API

revFormat([options])

prefix

Type: string Default: "-"

Prefix appended to Hash.

suffix

Type: string Default: ""

Suffix appended to Hash.

lastExt

Type: boolean Default: false

Append formatted Hash just before last extension of a file.

(By default, gulp-rev and this plugin will append the formated Hash just before the first . of a filename)

If true, unicorn.ext1.ext2.css would become unicorn.ext1.ext2-<prefix>d41d8cd98f<suffix>.css

Note with default options, output is the same with gulp-rev: unicorn.cssunicorn-d41d8cd98f.css

Requirements

Files passed must have passed through gulp-rev, so they would have file.revOrigPath and file.revHash added (read more).

Acknowledgements

  • gulp-rev's author and maintainers - For their awesome work on gulp-rev
  • @lukeed - For suggesting the solution for this task

License

MIT © Andrei Tamas

Current Tags

  • 1.0.5                                ...           latest (7 months ago)

6 Versions

  • 1.0.5                                ...           7 months ago
  • 1.0.4                                ...           4 years ago
  • 1.0.3                                ...           4 years ago
  • 1.0.2                                ...           4 years ago
  • 1.0.1                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 39
This Month 30
Last Day 0
Last Week 19
Last Month 79
Dependencies (4)
Dev Dependencies (3)

Copyright 2014 - 2016 © taobao.org |