Background
I am using Yeoman webapp to scaffold my frontend. Within the gruntfile, they are using grunt-rev and grunt-usemin
Grunt-rev will "rev'ed" my assets and grunt-usemin will update the asset path.
Problem
I have a webfont that I am using. I placed the fonts folder in my styles directory as mentioned in the gruntfile.js ( 'styles/fonts/{,/}.*' ) Grunt serve is showing my fonts properly but after I built the file, it no longer works because the font filename has been prefixed with some weird gibberish characters. eg: 63b122ab.fontname.ttf instead of fontname.ttf
This is for cache busting. But my .css file isn't updating the path to pick it up.
In my usemin block within gruntfile.js
What should I do? I have this currently but it is not working.
usemin: {
options: {
assetsDirs: ['<%= config.dist %>', '<%= config.dist %>/images', '<%= config.dist %>/styles/fonts']
},
html: ['<%= config.dist %>/{,/}.html'],
css: ['<%= config.dist %>/styles/{,/}.css']
},
It is picking up everything else but not the fonts. I manually created the fonts folder. So I am guessing the gruntfile.js has to be updated to reflect the change.
'<%= yeoman.dist %>/styles/fonts/*'
inside thefilerev -> dist -> srv
object helps but thats not what I want. Any other ideas on this? I'm using the sass font helperfont-url
, but that also doesn't help. - 23tux