 
 # Start a web server without rebuilding
 gulp.task 'serve', ->
-	startServer DIST_DIRECTORY
-	openApp DIST_DIRECTORY
+	startServer()
+	openApp()
 
 # Start a web server
 gulp.task 'server', ['build'], ->
-	startServer DIST_DIRECTORY
+	startServer()
 
 # Process SPA
 gulp.task 'spa', ['scripts', 'styles'].concat(if isProd then 'templateCache' else 'views'), ->

			url: appUrl

	gulp
		.src sources, cwd: rootDirectory
		.on 'error', onError

		.pipe open '', options.open
		.on 'error', onError

startServer = (rootDirectory) ->
	connect.server
		livereload: !isProd
		port: PORT
		root: rootDirectory

unixifyPath = (p) ->
	p.replace /\\/g, '/'

# Compile JavaScript
gulp.task 'javaScript', ['prepare'], ->
	sources = getScriptSources '.js'
	srcs    = []

	srcs.push src =
		gulp
			.src sources, cwd: SRC_DIRECTORY
			.on 'error', onError
