var gulp = require('gulp');
var clean = require('gulp-clean');
var concat = require('gulp-concat');
var csslint = require('gulp-csslint');
var header = require('gulp-header');
var jshint = require('gulp-jshint');
var minifyCSS = require('gulp-minify-css');
var rename = require('gulp-rename');
var uglify = require('gulp-uglify');
var zip = require('gulp-zip');

var pkg = require('./package.json');
var basename = pkg.name + '-' + pkg.version;
var banner = '/*! {{ pkg.name }} v{{ pkg.version }} */';


// Lint JS + CSS
gulp.task('lint', function() {
  gulp.src('./src/*.js')
    .pipe(jshint())
    .pipe(jshint.reporter());

  gulp.src('./src/*.css')
    .pipe(csslint({
      'adjoining-classes': false,
      'box-sizing': false
    }))
    .pipe(csslint.reporter());
});

// Concat & Minify JS + CSS
gulp.task('minify', function(){
    gulp.src('./src/*.js')
        .pipe(concat(basename +'.js'))
        .pipe(gulp.dest('./dist'))
        .pipe(rename(basename + '.min.js'))
        .pipe(uglify())
        .pipe(header(banner, { pkg : pkg } ))
        .pipe(gulp.dest('./dist'));

    gulp.src('./src/*.css')
        .pipe(concat(basename +'.css'))
        .pipe(gulp.dest('./dist'))
        .pipe(rename(basename + '.min.css'))
        .pipe(minifyCSS())
        .pipe(header(banner, { pkg : pkg } ))
        .pipe(gulp.dest('./dist'));
});

// Package for distribution
gulp.task('zip', ['minify'], function(){
    gulp.src([
      'README.md',
      'LICENSE',
      'dist/' + basename + '.js',
      'dist/' + basename + '.min.js',
      'dist/' + basename + '.css',
      'dist/' + basename + '.min.css',
    ])
    .pipe(rename(function (dir, base, ext) {
        return (dir == 'dist' ? '../' : '') + base + ext;
    }))
    .pipe(zip(basename + '.zip'))
    .pipe(gulp.dest('dist'));
});

// Cleanup
gulp.task('clean', function() {
  gulp.src('./dist', {read: false})
    .pipe(clean());
});

// Default
gulp.task('default', function(){
  gulp.run('lint', 'minify');

  // Watch JS Files
  gulp.watch(['./src/*.js', './src/*.css'], function(event){
    gulp.run('lint', 'minify');
  });
});

@@ -785,17 +785,8 @@
 cat 
-& Minify 
 JS +
@@ -801,22 +801,22 @@
 p.task('
-minify
+concat
 ', funct
@@ -812,32 +812,33 @@
 cat', function()
+ 
 %7B%0A    gulp.src('
@@ -915,32 +915,249 @@
 .dest('./dist'))
+;%0A%0A    gulp.src('./src/*.css')%0A        .pipe(concat(basename +'.css'))%0A        .pipe(gulp.dest('./dist'));%0A%7D);%0A%0A// Minify JS + CSS%0Agulp.task('minify', %5B'concat'%5D, function() %7B%0A    gulp.src('./src/' + basename + '.js')
 %0A        .pipe(r
@@ -1316,37 +1316,12 @@
 src/
-*.css')%0A        .pipe(concat(
+' + 
 base
@@ -1330,51 +1330,16 @@
 me +
+ 
 '.css')
-)%0A        .pipe(gulp.dest('./dist'))
 %0A   
@@ -1522,16 +1522,16 @@
 ibution%0A
-
 gulp.tas
@@ -1557,24 +1557,25 @@
 , function()
+ 
 %7B%0A    gulp.s

Split concat from minify task