'use strict';

var gulp = require('gulp');
var babel = require('gulp-babel');
var del = require('del');
var lint = require('gulp-eslint');
var plumber = require('gulp-plumber');
var rename = require('gulp-rename');

var srcJS = './src/foo.js';

// Tasks
// ---------------------------------------------------------
gulp.task('clean', function () {
  del(['./foo.js']);
});

gulp.task('lint', function () {
  return gulp.src(srcJS)
    .pipe(plumber())
    .pipe(lint())
    .pipe(lint.format())
    .pipe(lint.failOnError());
});

gulp.task('build', ['clean', 'lint'], function () {
  return gulp.src(srcJS)
    .pipe(plumber())
    .pipe(babel())
    .pipe(rename('index.js'))
    .pipe(gulp.dest('./'));
});

gulp.task('watch', function () {
  gulp.watch(srcJS, ['lint']);
});

// default task
// -----------------------------------------------
gulp.task('default', ['clean', 'lint', 'watch']);

@@ -217,23 +217,33 @@
 var 
-srcJS =
+config = %7B%0A  src:
  './src/
 foo.
@@ -238,23 +238,28 @@
  './src/
-foo
+server
 .js'
+%0A%7D
 ;%0A%0A// Ta
@@ -370,14 +370,12 @@
 %5B'./
-foo.js
+dist
 '%5D);
@@ -422,37 +422,42 @@
 return gulp.src(
+config.
 src
-JS
 )%0A    .pipe(plum
@@ -612,21 +612,26 @@
 ulp.src(
+config.
 src
-JS
 )%0A    .p
@@ -777,13 +777,18 @@
 tch(
+config.
 src
-JS
 , %5B'

Set gulpfile config vars