 gulp = require 'gulp'
 # browserify = require 'browserify'
 # buffer = require 'vinyl-buffer'
+gutil = require 'gulp-util'
 coffee = require 'gulp-coffee'
 clean = require 'gulp-clean'
 mocha = require 'gulp-mocha'

	prefix: 'gulp'

BUILDDIR = 'build/'


gulp.task 'default', ['b']

	
	rm [BUILDDIR + 'server/', 'server.js']

	gulp.src('server/**/*.coffee')
	 .pipe(coffee({bare: true}).on('error', gutil.log))
	 .pipe(gulp.dest BUILDDIR + 'server/')
	
	gulp.src('server.coffee')
	 .pipe(coffee({bare: true}).on('error', gutil.log))
	 .pipe(gulp.dest BUILDDIR)

	gulp.src('package.json')
	 .pipe(gulp.dest BUILDDIR)

	logger.info "Compilation succeeded."

