Open skidvd opened 9 years ago
I need this too!
@skidvd it would be better if could share your project:
Your task configuration should be something like this (it's a working configuration):
useminPrepare: {
html: '<%= yeoman.app %>/index.html',
options: {
dest: '<%= yeoman.dist %>'
}
},
usemin: {
html: [
'<%= yeoman.dist %>/index.html',
'<%= yeoman.dist %>/authentication-ko.html'
],
css: ['<%= yeoman.dist %>/styles/{,*/}*.css'],
js: ['<%= yeoman.dist %>/scripts/{,*/}*.js'],
options: {
assetsDirs: ['<%= yeoman.dist %>'],
patterns: {
/* your regexp */
}
}
},
By the way could you give the configuration for the cdnify ? If you remove the cdnify task does it work ?
I've run into the same issue, and it's not just a "debug request." I wanted to append a CDN path before my revved files and running them through the blockReplacements just doesn't work with the revved version replacements. With 3.1.1 at least, it seems that you can have either blockReplacement OR file revving, but not both. Any ideas?
I'm sorry for the basic question, but I have been beating my head against the wall with this problem unsuccessfully. The blocks created in my HTML are getting successfully concatenated, copied, uglified and filerev-ed. However, the block replacement is NOT being replaced with the revved version of the file.
I am using grunt: 0.4.1, grunt-filerev: 0.2.1, grunt-usemin: 2.6.2
I am following the base yoeman dir structure and the key directories of my app are as follows:
For example, my index.html has:
These files get successfully concatenated into dist/styles/vendor.css and subsequently revved into dist/styles/vendor.62f24b9e.css as expected. However, the replacement in my index.html only gets:
as opposed to the revved version it should have:
I want to rev all HTML (including partials), css, images and JS and use have these replaced globally across my project.
Similar situations are happening with the JS scripts files, images and HTML partials as well.
Here are the relevant sections from my Gruntfile (please excuse the commented out various attempts I have made to debug and/or resolve this without success):
I will greatly appreciate any help to resolve this as I have read and reread the documentation and many google search results, but am still missing the critical ingredients to make this seemingly simple task succeed.
Thank you!