I'm trying to create a gulp task that creates (in this case minifies) a css file for every project css there is. So for Project A it should combine and minify the following files:
global.projecta.css tool1.projecta.css tool2.projecta.css It needs a kind of loop or something...? If there is a new Project D, it should build it too. If i need to add something like "projectd" to an array, that would be ok too.
This is the directory structure for the css
./global.projecta.css ./global.projectb.css ./global.projectc.css ./addons/tool1.projecta.css ./addons/tool2.projecta.css ./addons/tool1.projectb.css ./addons/tool2.projectb.css ./addons/tool1.projectc.css ./addons/tool2.projectc.css This is the not working task
// not working.... gulp.task('css', function() { return gulp.src(['global.*.css', 'addons/tool*.css', '!*.min.css']) .pipe(concat('build.css')) .pipe(rename({suffix: '.min'})) .pipe(minifycss()) .pipe(gulp.dest('build/css')); });