var jshint = require('gulp-jshint');
var stylish = require('jshint-stylish');
var jscs = require('gulp-jscs');
var gulp = require('gulp');
var mocha = require('gulp-mocha');

var testfiles = './test/**/*.js';
var files = [
  './server/**/*.js',
  './clinet/**/*.js',
  testfiles
];

// Test
gulp.task('test', function () {
  return gulp.src(testfiles, { read: false })
    .pipe(mocha({
      reporter: 'spec'
    }));
});

// Style Check
gulp.task('jshint', function () {
  return gulp.src(files)
    .pipe(jshint({ linter: require('jshint-jsx').JSXHINT }))
    .pipe(jshint.reporter(stylish))
    .pipe(jshint.reporter('fail', { verbose: true }));
});

gulp.task('jscs', function () {
  return gulp.src(files)
    .pipe(jscs());
});

gulp.task('default', ['jshint', 'jscs']);

@@ -406,24 +406,147 @@
 pec'%0A    %7D))
+%0A    .once('error', function () %7B%0A      process.exit(1);%0A    %7D)%0A    .once('end', function () %7B%0A      process.exit();%0A    %7D)
 ;%0A%7D);%0A%0A// St

modify gulp mocha setting