jamesknelson / gulp-rev-replace

Rewrite occurences of filenames which have been renamed by gulp-rev
MIT License
388 stars 62 forks source link

Question: How to use gulp-rev & gulp-rev-replace with custom src that does not match file name #67

Open dragonflypl opened 8 years ago

dragonflypl commented 8 years ago

In Spring MVC application I have a set of script tags that in src attribute have a variable that drives which file version is used: <%=jsSuffix%> - it is set using application configuration settings during the runtime (long story but I think it has to stay this way):

<script src="build/js/app-vendor<%=jsSuffix%>.js "></script>
<script src="build/js/app-gom<%=jsSuffix%>.js "></script>
<script src="build/js/app<%=jsSuffix%>.js "></script>

Unfortunately gulp-rev & gulp-rev-replace does not match this syntax with physical file names (app-vendor.js and app-vendor.min.js).

Can this be achieved?