UNPKG

gulp-rev-all-revise

Version:

base on gulp-rev-append-all that replace "?rev=@@hash" with hash string and gulp-rev-append-all will not but append a hash string like "?v=xxx" to the end of ref in file.

19 lines (14 loc) 504 B
'use strict'; var fs = require('fs'); var path = require('path'); var basePath = path.join(process.cwd(), 'test', 'fixtures', 'static'); var World = function World(callback) { this.indexFile = undefined; this.FILE_DECL = /(?:href=|src=|url\()['|"]([^\s>"']+?)\?rev=([^\s>"']+?)['|"]/gi; this.plugin = require('../../'); this.htmlFileContents = function(filename) { return fs.readFileSync([basePath, filename + '.html'].join(path.sep)); }; callback(); }; module.exports.World = World;