var gulp  = require('gulp'),
    del = require("del"),
    concat = require('gulp-concat'),
    cssmin = require('gulp-cssmin'),
    uglify = require('gulp-uglify');

gulp.task("clean", function() {
  return del("lib/*");
});

gulp.task("minjs", ["clean"], function(){
  return gulp.src("src/scripts/*.js")
    .pipe(concat("all.min.js"))
    .pipe(uglify())
    .pipe(gulp.dest("lib"));
});

gulp.task("mincss", ["clean"], function(){
  return gulp.src("src/css/*.css")
    .pipe(concat("styles.css"))
    .pipe(cssmin())
    .pipe(gulp.dest("lib"));
});

gulp.task("default", ["mincss","minjs"]);
