 # Styles
 ###
 gulp.task 'styles', ->
-
-	gulp.src( 'app/styles/**/*.styl' )
-		.pipe(stylus())
-		.pipe(gulp.dest( 'dist/styles/' ))
-		.pipe(livereload(server))
-
+	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

		# Watch .styl files
		gulp.watch "app/styles/**/*.styl", (e)->
			gulp.start 'styles'

		# Watch .coffee files
		gulp.watch "app/scripts/**/*.coffee", (e)->
			gulp.start 'scripts'

		# Watch .jade files
		gulp.watch ["app/*.jade","app/templates/**/*.jade"], (e)->
			gulp.start 'templates'



# Templates HTML
###
gulp.task 'templates', ->
	gulp.src('app/*.jade')
			.pipe(jade())
			.pipe(embedlr()) # Add livereload script
			.pipe(gulp.dest('dist/'))
			.pipe(livereload(server))

###
# Default task
###
gulp.task 'default', ->
	gulp.start('styles', 'templates', 'scripts')

###
# Static server, livereload and watch changes
###
gulp.task 'watch', ->
	gulp.start('default')

	# Create static server
	http.createServer(
