gulp-rev-all
Advanced tools
Comparing version 0.8.19 to 0.8.20
{ | ||
"name": "gulp-rev-all", | ||
"version": "0.8.19", | ||
"version": "0.8.20", | ||
"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", |
@@ -309,5 +309,5 @@ # [gulp](https://github.com/wearefractal/gulp)-rev-all [![Build Status](https://travis-ci.org/smysnk/gulp-rev-all.png?branch=master)](https://travis-ci.org/smysnk/gulp-rev-all) | ||
In some cases content that is not a file reference may be incorrectly be replaced with a file reference.<br/> | ||
In some cases, false-positives may occur. Strings that are similar to a file reference may be incorrectly be replaced.<br/> | ||
In the example below the 2nd instance of 'xyz' is not reference to the file xyz.js: | ||
In the example below, the 2nd instance of 'xyz' is not reference to the file xyz.js: | ||
@@ -317,3 +317,3 @@ ```js | ||
angular.controller('myController', ['xyz', function(xyz){ | ||
angular.controller('myController', ['xyz', function(xyz) { | ||
... | ||
@@ -323,3 +323,3 @@ }]); | ||
It will hoever still be replaced resulting in file corruption: | ||
It will still however be replaced resulting in file corruption: | ||
@@ -329,3 +329,3 @@ ```js | ||
angular.controller('myController', ['xyz.123', function(xyz){ | ||
angular.controller('myController', ['xyz.123', function(xyz) { | ||
... | ||
@@ -347,3 +347,3 @@ }]); | ||
```js | ||
options.annotator = function(contents, path){ | ||
options.annotator = function(contents, path) { | ||
var fragments = [{'contents': contents}]; | ||
@@ -366,3 +366,3 @@ return fragments; | ||
```js | ||
options.replacer = function(fragment, replaceRegExp, newReference, referencedFile){ | ||
options.replacer = function(fragment, replaceRegExp, newReference, referencedFile) { | ||
fragment.contents = fragment.contents.replace(replaceRegExp, '$1' + newReference + '$3$4'); | ||
@@ -369,0 +369,0 @@ }; |
@@ -365,5 +365,5 @@ var Gutil = require('gulp-util'); | ||
if(this.options.transformPath) { | ||
if (this.options.transformPath) { | ||
// Transform path using client supplied transformPath callback, | ||
pathReferenceReplace = this.options.transformPath.call(this, pathReferenceReplace, reference.path, reference.file); | ||
pathReferenceReplace = this.options.transformPath.call(this, pathReferenceReplace, reference.path, reference.file, file); | ||
} else if (this.options.prefix && pathReferenceReplace[0] === '/') { | ||
@@ -374,3 +374,2 @@ // Append with user supplied prefix | ||
if (this.shouldUpdateReference(reference.file)) { | ||
@@ -377,0 +376,0 @@ // The extention should remain constant so we dont add extentions to references without extentions |
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
739691