I'm using grunt-contrib's concat
and uglify
modules to process some javascript. Currently if src/js/
is empty, they will still create an (empty) concat'd file, along with the minified version and a source map.
I want to task to detect if the src/js/
folder is empty before proceeding, and if it is, then the task should skip (not fail). Any ideas how to do this?
The solution may not be the prettiest, but could give you an idea. You'll need to run something like
npm install --save-dev glob
first. This is based on part of theMilkshake
project you mentioned.A gist for comparison: https://gist.github.com/kosmotaur/61bff2bc807b28a9fcfa