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?
Aug 26, 2015

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 ?

Dec 21, 2015

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']

Dec 21, 2015

Gah, that got completely garbled

Markdown is allowed