guozhenyi / gulp-rev-html

Static asset revisioning by appending timestamp to filenames: style.css => style.css?v=1646036823

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Version License

gulp-rev-html

Static asset revisioning by appending timestamp to filenames:
style.css => style.css?v=1646036823
index.js => index.js?v=1646036823

Install

npm:

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

yarn:

$ yarn add --dev gulp-rev-html

Usage

const gulp = require('gulp');
const revHtml = require('gulp-rev-html');

function addTime() {
  return gulp.src('src/**/*.html')
    .pipe(revHtml())
    .pipe(gulp.dest('dist'));
}

exports.default = gulp.series(addTime);

License

MIT

About

Static asset revisioning by appending timestamp to filenames: style.css => style.css?v=1646036823

License:MIT License


Languages

Language:JavaScript 100.0%