possibility to add a revision number to cdn path
vdclouis opened this issue · comments
Louis Van de Calseyde commented
something like:
files: [
{
file: 'scripts/all.js',
cdn: '//static.cdn.url/scripts/all.js?v=098f6bcd'
}
]
Phil DeJarnett commented
To clarify, are you wanting the REV hash from the embedded file available to templates? You can easily do this by specifying your own custom template.
For example, if the original file in your HTML was /scripts/all.js?v=098f6bcd
, your template could be:
{
file: 'scripts/all.js*', // note the * to match anything after the filename
cdn: '//static.cdn.url/${ filepathRel }'
}
As long as you add the revision number first, it will be included in the result.
Phil DeJarnett commented
Also, this probably will work just fine with ${ filename }
, since the path
module will leave the ?v=...
.
Louis Van de Calseyde commented
thanks man, works great!