gulp-rev-all
Advanced tools
Comparing version 0.9.0 to 0.9.1
25
index.js
var Through = require('through2'); | ||
var Revisioner = require('./revisioner'); | ||
var gutil = require('gulp-util'); | ||
var PluginError = gutil.PluginError; | ||
var PLUGIN_NAME = 'gulp-rev-all'; | ||
module.exports = { | ||
@@ -14,3 +18,4 @@ | ||
if (file.isStream()) { | ||
throw new Error('Streams are not supported!'); | ||
this.emit('error', new PluginError(PLUGIN_NAME, 'Streams not supported!')); | ||
return callback(); | ||
} | ||
@@ -47,3 +52,5 @@ | ||
revisioner = file.revisioner; | ||
if (!revisioner) { | ||
revisioner = file.revisioner; | ||
} | ||
@@ -55,2 +62,7 @@ // Drop any existing files off the stream | ||
if (!revisioner) { | ||
this.emit('error', new PluginError(PLUGIN_NAME, 'revision() must be called first!')); | ||
return callback('abc'); | ||
} | ||
this.push(revisioner.versionFile()); | ||
@@ -71,3 +83,5 @@ callback(); | ||
revisioner = file.revisioner; | ||
if (!revisioner) { | ||
revisioner = file.revisioner; | ||
} | ||
callback(); | ||
@@ -77,2 +91,7 @@ | ||
if (!revisioner) { | ||
this.emit('error', new PluginError(PLUGIN_NAME, 'revision() must be called first!')); | ||
return callback(); | ||
} | ||
this.push(revisioner.manifestFile()); | ||
@@ -79,0 +98,0 @@ callback(); |
{ | ||
"name": "gulp-rev-all", | ||
"version": "0.9.0", | ||
"version": "0.9.1", | ||
"description": "Static asset revisioning by appending content hash to filenames: unicorn.css => unicorn.098f6bcd.css, also re-writes references in each file to new reved name.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
730675
1723