I worked with the Grunt cssmin plugin . I had a block in my Gruntfile that looked something like this:
cssmin: { target: { files: { '<%= config.target %>/mytarget.css': [ 'bower_components/normalize.css/*.css', 'bower_components/html5-boilerplate/css/main.css', '<%= config.src %>/css/*.css' ] } } }
For some time this worked fine; but I moved it to another machine and did not correctly configure my deck components - the html5-boilerplate/css/main.css missing - and yet the task was still completed successfully. In fact, I can put completely fake paths into this array, and minimization is still being completed.
Is there any way at all to make Grunt crash and exit if the files are missing from such an array? (I'm not sure if the file array is a general Grunt concept or provided by cssmin). If not, is there a way to cause this particular plugin to crash?
(By the way, I know that the HTML5 Boilerplate is probably a bit old-fashioned these days, but I'm in the process of moving the old site. I also fixed my Bower installation process so that it runs automatically before this step, but I still would like to figure out more general solution to the problem with missing files).
source share