grunt-usemin icon indicating copy to clipboard operation
grunt-usemin copied to clipboard

Warning: Cannot read property 'js' of undefined

Open bullgare opened this issue 12 years ago • 4 comments

I stucked on this warning for a while. It happens if you set flow option with:

useminPrepare: {
    html: 'built/index.html',
    options: {
        root: '../../app/',
        dest: 'built',
        staging: 'tmp',
        flow: {
            steps: {'js': ['concat', 'uglifyjs']}
        }
    }
}

Fix is simple, just insert 'post' property:

useminPrepare: {
    html: 'built/index.html',
    options: {
        root: '../../app/',
        dest: 'built',
        staging: 'tmp',
        flow: {
            steps: {'js': ['concat', 'uglifyjs']},
            post: []
        }
    }
}

I think usage of steps parameter alone should be mentioned in readme or fixed.

bullgare avatar Nov 28 '13 13:11 bullgare

thanks :+1:

It helps a lot

gudh avatar Jan 29 '14 02:01 gudh

Had the same issue just now. Would be nice to not have to define a empty post flow.

yfr avatar Sep 08 '14 12:09 yfr

Thanks, helped me too.

calmdev avatar Dec 04 '14 22:12 calmdev

@calmdev @yfr which version of usemin are you using ?

stephanebachelier avatar Feb 22 '15 01:02 stephanebachelier