import gulp from 'gulp';
import concat from 'gulp-concat';
import sassLint from 'gulp-sass-lint';
import sass from 'gulp-sass';
import del from 'del';

const _paths = {
    scss: './src/**/*.scss',
    build: './dist',
    build_scss: './src/*.*',
    dist_file: '_spread.scss',
    tests: './test/all.scss',

    includes: [
        'node_modules/sass-true/sass',
        'node_modules/include-media/dist'
    ]
};

export const merge = () =>
    gulp.src(_paths.build_scss)
        .pipe(concat(_paths.dist_file))
        .pipe(gulp.dest(_paths.build));

export const lintStyles = () =>
    gulp.src(_paths.scss)
        .pipe(sassLint())
        .pipe(sassLint.format());


export const clean = del.bind([_paths.build]);

export const test = () =>
    gulp.src(_paths.tests)
        .pipe(sass({
            includePaths: _paths.includes
        }))
        .pipe(gulp.dest(_paths.build));


export default gulp.series(clean, lintStyles, merge);

@@ -1,19 +1,34 @@
 import 
-gulp
+%7Bsrc, dest, series%7D
  from 'g
@@ -448,37 +448,32 @@
 rge = () =%3E%0A    
-gulp.
 src(_paths.build
@@ -525,37 +525,32 @@
 )%0A        .pipe(
-gulp.
 dest(_paths.buil
@@ -583,37 +583,32 @@
 les = () =%3E%0A    
-gulp.
 src(_paths.scss)
@@ -695,16 +695,23 @@
 n = 
-del.bind
+(done) =%3E %7B del
 (%5B_p
@@ -722,17 +722,37 @@
 .build%5D)
-;
+.then(() =%3E done()) %7D
 %0A%0Aexport
@@ -775,21 +775,16 @@
  =%3E%0A    
-gulp.
 src(_pat
@@ -882,21 +882,16 @@
   .pipe(
-gulp.
 dest(_pa
@@ -924,13 +924,8 @@
 ult 
-gulp.
 seri

fix clean task