-
Notifications
You must be signed in to change notification settings - Fork 110
Open
Description
My compress config creation function loops over many whitelabel folders, and creates zips of the assets it finds inside each white label:
var src = ['./asset/whitelabels/', '!.zip'];
grunt.file.expand({filter: 'isDirectory'}, module).forEach(function (dir) {
var compress = grunt.config.get('compress') || {};
// set the config for this modulename-directory
compress[dir] = {
files:
[
{
src: [
dir + '**/graphics/**/*.png',
dir + '**/core/**/*.mp3',
]
}
],
options:
{
archive: function () {
return 'dist/' + dir.toLowerCase() + '.zip'
}
}
};
// save the new concat configuration
grunt.config.set('compress', compress);
});
grunt.task.run('compress');
My problem is, if there were no assets within a particular whitelabel folder/subfolders, it creates an empty zip archive. I would like to skip the creation of empty archives, is it possible to specify that?
thanks
Metadata
Metadata
Assignees
Labels
No labels