'use strict';
var gulp = require('gulp');
var del = require('del');
var mocha = require('gulp-mocha');

var options = {
  paths: {
    build: './build',
    src: './src',
    tests: {
      server: './tests/server/**/*_test.js',
      client: './tests/client/**/*_test.js'
    }
  },
};

gulp.task('clean', function(cb) {
  del(options.build, cb);
});

gulp.task('tests:server', function() {
  return gulp.src(options.paths.tests.server, {
    read: false
  })
    .pipe(mocha({
      ui: 'bdd',
      reporter: 'spec'
    }));
});

gulp.task('watch', function() {
  gulp.watch(options.paths.tests.server,['tests:server']);
});

gulp.task('tests', ['tests:server']);

gulp.task('default', ['tests']);
gulp.task('dev', ['default', 'watch']);

@@ -95,16 +95,129 @@
 mocha');
+%0Avar path = require('path');%0Avar source = require('vinyl-source-stream');%0Avar browserify = require('browserify');
 %0A%0Avar op
@@ -277,16 +277,59 @@
 ./src',%0A
+    client: %7B%0A      js: 'client/js'%0A    %7D,%0A
     test
@@ -485,16 +485,22 @@
 options.
+paths.
 build, c
@@ -523,170 +523,996 @@
 sk('
-tests:server', function() %7B%0A  return gulp.src(options.paths.tests.server, %7B%0A    read: false%0A  %7D)%0A    .pipe(mocha(%7B%0A      ui: 'bdd',%0A      reporter: 'spec'%0A    %7D))
+copy', %5B'clean'%5D, function() %7B%0A  return gulp.src('./' + path.join(options.paths.src, options.paths.client.js,'index.html'))%0A    .pipe(gulp.dest(options.paths.build));%0A%7D);%0A%0Agulp.task('tests:server', function() %7B%0A  return gulp.src(options.paths.tests.server, %7B%0A    read: false%0A  %7D)%0A    .pipe(mocha(%7B%0A      ui: 'bdd',%0A      reporter: 'dot'%0A    %7D));%0A%7D);%0A%0Agulp.task('browserify:app', %5B'browserify:vendors'%5D, function() %7B%0A  var bundleStream = browserify('./' + path.join(options.paths.src, options.paths.client.js,'app.js'));%0A%0A  bundleStream%0A    .external('socket.io-client')%0A    .external('jquery')%0A    .bundle()%0A    .pipe(source('app.js'))%0A    .pipe(gulp.dest(options.paths.build + '/js'));%0A%0A  return bundleStream;%0A%7D);%0A%0A%0Agulp.task('browserify:vendors', function() %7B%0A  var bundleStream = browserify();%0A%0A  bundleStream%0A    .require('socket.io-client')%0A    .require('jquery')%0A    .bundle()%0A    .pipe(source('vendors.js'))%0A    .pipe(gulp.dest(options.paths.build + '/js'));%0A%0A  return bundleStream
 ;%0A%7D)
@@ -1648,16 +1648,60 @@
 ver'%5D);%0A
+gulp.task('browserify', %5B'browserify:app'%5D);
 %0Agulp.ta
@@ -1711,24 +1711,46 @@
 'default', %5B
+'copy', 'browserify', 
 'tests'%5D);%0Ag

Add task copy and browserify on gulp