grunt usemin with oclazyload
Posted in General by Nishith Wed Aug 26 2015 06:52:18 GMT+0000 (Coordinated Universal Time)·3·Viewed 3,571 times
I have used oclazyload with ui-router. For build process, we have minified the controller files and using grunt filerev, we have changed the name of files. We need to update those file names in router file with grunt usemin. Can you tell me how we should do that?
Hmm no sorry I have no idea, this would probably be something that you should ask to the devs of grunt filerev or grunt usemin ?
I had exactly the same thing. This is how I solved it in my GruntFile. This essentially tells usemin to look for 'anystring.js' and check if that path has been minified.
usemin: {
js: ['<%= module.dist %>/*/.js'],
options: {
assetsDirs: ['<%= module.dist %>'],
patterns: {
js: [
[/"'["']/gm, 'Update the JS references to other js files to reference their new revved counterparts']
]
}
}
},
Gah, that got completely garbled