This PR consist of a bux fixing and some minor refactoring.
The encoutered bug:
file.js:
var loadFile = "nopestyle.css";
style.css:
body {}
nopestyle.css:
html{}
Using gulp-rev-replace with this setup, you will endup with file.js being replaced with the reved version of style.css because the match is not
done on the longest string, it was done on random string length based on the order files are pushed into the gulp stream.
I hope my explanation is clear, you can have a look at the newly created tests if not.
This is not the "perfect" solution but it's still sufficient.
Hi,
This PR consist of a bux fixing and some minor refactoring.
The encoutered bug:
file.js:
style.css:
nopestyle.css:
Using gulp-rev-replace with this setup, you will endup with
file.js
being replaced with the reved version ofstyle.css
because the match is not done on the longest string, it was done on random string length based on the order files are pushed into the gulp stream.I hope my explanation is clear, you can have a look at the newly created tests if not.
This is not the "perfect" solution but it's still sufficient.
Let met know @jamesknelson