PaulTondeur / grunt-cache-busting

Cache busting files and updating references
8 stars 13 forks source link

Having a directory with the same name as the file breaks the replacement #16

Open tomasAlabes opened 8 years ago

tomasAlabes commented 8 years ago

Example:

bust: {
    replace: ['my.html'],
    replacement: 'jquery.js',
    file: 'somewhere/jquery.js'
}

The html

<script src="jquery/jquery.js"></script>

is being transformed to:

<script src="jquery-HASH.js"></script>
<!-- instead of -->
<script src="jquery/jquery-HASH.js"></script>

FYI, I'm not really trying to cache-bust jquery, I just chose it as an example. I saw in the code that the extension is pretty coupled to everything else, so it wasn't straight forward to fix it.

Thanks for plugin by the way ;)