Skip to content

Instantly share code, notes, and snippets.

@gustavoquinalha
Created April 27, 2017 20:15
Show Gist options
  • Save gustavoquinalha/d8e7a410ab175266d6674b27ef759adc to your computer and use it in GitHub Desktop.
Save gustavoquinalha/d8e7a410ab175266d6674b27ef759adc to your computer and use it in GitHub Desktop.
copile, minific and zip archive
gulp.task('copile-css', function() {
return gulp.src(components)
.pipe(concat('monk-framework.css'))
.pipe(gulp.dest('./_download'));
});
gulp.task('copile-css-min', function() {
return gulp.src(components)
.pipe(concat('monk-framework.min.css'))
.pipe(cleanCSS({debug: true}, function(details) {
console.log(details.name + ': ' + details.stats.originalSize);
console.log(details.name + ': ' + details.stats.minifiedSize);
}))
.pipe(gulp.dest('./_download'));
});
gulp.task('zip-css', function(){
gulp.src('./_download/*.css')
.pipe(zip('monk-framework.zip'))
.pipe(gulp.dest('./_download'))
});
gulp.task('copile', function(callback) {
runSequence('copile-css','copile-css-min', ['zip-css'], callback);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment