I'm trying to use grunt-usemin and grunt-filerev to version my static files. I use browserify for all concatenation, uglification, etc. So I really just need to version the end files and replace them in my html.
The problem I'm running into is that I have meta tags with content attributes that match one of my filenames.
So I have a revisioned file like:
static/app_name.198615a3.css
as well as meta tags like:
<meta name="apple-mobile-web-app-title" content="app_name">
<meta property="og:site_name" content="app_name">
I've added a pattern option in usemin
usemin: {
html: ['dist/layout.html'],
options: {
assetsDirs: ['static'],
patterns: {
html: [
[/(app_name\.css)/, 'Replacing reference to app_name.css'],
],
},
}
},
Which works fine for changing the references to app_name.css in layout.html to its versioned counterpart, but unfortunately it's also replacing the meta tag content attributes
<meta name="apple-mobile-web-app-title" content="app_name.198615a3.css">
<meta property="og:site_name" content="app_name.198615a3.css">
Is there a way to only use the patterns for matching, or to somehow ignore specific patterns? Am I going about this incorrectly?