Closed uselesscode closed 10 years ago
I confirm this. I believe the problem relies on the fact that the search and replace code in the plugin uses the file path in the search expression. If you are on Windows, this means "css\style.css", which will fail because the HTML has "css/style.css".
I've temporarily fixed this just adding .replace(path.separator,'/') to line 8 to normalize the separator, but this assumes that no one will be using windows-style paths o their html urls (it's a fair assumption, I believe).
@jamesknelson I will create a pull request, however I'm not sure if this is the best possible fix (I'm just starting with NodeJS / Gulp). Feel free to ignore the pull if there is a better solution.
+1
:+1:
Can somebody confirm for me that merging #5 has fixed this? I'd happily merge a test for it as well...
When using gulp-useref to combine files if you put the combined file in a subdirectory, gulp-rev will rename the files and they will be placed in the subdirectory but gulp-rev-replace will not replace the file names in the HTML file.
This will work:
But this will not:
The final HTML produced would look like this: