const gulp = require('gulp');
const autoprefixer = require('gulp-autoprefixer');
const cssnano = require('gulp-cssnano');
const uglify = require('gulp-uglify');
const notify = require('gulp-notify');
const rename = require('gulp-rename');

gulp.task('default', ['styles', 'scripts']);

gulp.task('styles', () => {
  return gulp.src('./dist/css/styles.css')
    .pipe(autoprefixer({
      browsers: ['last 2 versions'],
      cascade: false,
    }))
    .pipe(rename({ suffix: '.min' }))
    .pipe(cssnano())
    .pipe(gulp.dest('./dist/css'))
    .pipe(notify({ message: 'Styles task complete' }));
});

gulp.task('scripts', () =>{
  return gulp.src('./dist/js/index.js')
    .pipe(rename({ suffix: '.min' }))
    .pipe(uglify())
    .pipe(gulp.dest('./dist/js'))
    .pipe(notify({ message: 'Scripts task complete' }));
});


@@ -299,21 +299,26 @@
 tyles', 
-() =%3E
+function()
  %7B%0A  ret
@@ -627,13 +627,19 @@
 s', 
+function
 () 
-=%3E
 %7B%0A  
@@ -809,29 +809,28 @@
 pts task complete' %7D));%0A%7D);%0A
-%0A

fix gulp file for codeclimate