-"use strict"
+'use strict'
 
 # Gulp
-gulp	 		= require 'gulp'
-util 			= require 'gulp-util'
-watch	 		= require 'gulp-watch'
-rename 		= require 'gulp-rename'
-header 		= require 'gulp-header'
+gulp	 		= require('gulp')
+util 			= require('gulp-util')
+watch	 		= require('gulp-watch')
+rename 		= require('gulp-rename')
+header 		= require('gulp-header')
 
 # Preprocessors
-coffee	 	 = require 'gulp-coffee'
-react 		 = require 'gulp-react'
-browserify = require 'gulp-browserify'
-stylus	 	 = require 'gulp-stylus'
-jade	 	   = require 'gulp-jade'
+coffee	 	 = require('gulp-coffee')
+react 		 = require('gulp-react')
+browserify = require('gulp-browserify')
+stylus	 	 = require('gulp-stylus')
+jade	 	   = require('gulp-jade')
 
 # Server, livereload
 ecstatic 	 = require('ecstatic')
 http 		   = require('http')
-embedlr 	 = require("gulp-embedlr")
+embedlr 	 = require('gulp-embedlr')
 livereload = require('gulp-livereload')
 server 		 = require('tiny-lr')()
 

# Styles
###
gulp.task 'styles', ->

	gulp.src( 'app/styles/**/*.styl' )
		.pipe(stylus())
		.pipe(gulp.dest( 'dist/styles/' ))
		.pipe(livereload(server))


###
# Scripts


	# Listen on port 35729
	server.listen 35729, (err) ->
		return console.log(err) if err

		gulp.watch('app/styles/**/*.styl', ['styles']) # Watch .styl files
		gulp.watch('app/scripts/**/*.coffee', ['scripts']) # Watch .coffee files
		gulp.watch(['app/*.jade','app/templates/**/*.jade'], ['templates']) # Watch .jade files