 					base: ''
 					middleware: connect_middleware
 
+		### STATIC FILES ###
+		rsync:
+			options:
+				args: ["--verbose", "-i"]
+				exclude: [".git*"]
+				recursive: true
+			compiled:
+				options:
+					src: "./src/static/"
+					dest: "./compiled/static"
+			dist:
+				options:
+					src: "./src/static/"
+					dest: "./dist/static"
+
 		### HTML ###
 		
 		jade:

	### TASKS ###
	#############

	grunt.loadNpmTasks 'grunt-contrib-coffee'
	grunt.loadNpmTasks 'grunt-contrib-concat'
	grunt.loadNpmTasks 'grunt-contrib-connect'
	grunt.loadNpmTasks 'grunt-contrib-copy'
	grunt.loadNpmTasks 'grunt-contrib-cssmin'
	grunt.loadNpmTasks 'grunt-contrib-jade'
	grunt.loadNpmTasks 'grunt-contrib-requirejs'
	grunt.loadNpmTasks 'grunt-contrib-stylus'
	grunt.loadNpmTasks 'grunt-contrib-uglify'
	grunt.loadNpmTasks 'grunt-contrib-watch'
	grunt.loadNpmTasks 'grunt-shell'
	grunt.loadNpmTasks 'grunt-text-replace'
	grunt.loadNpmTasks 'grunt-groc'

	grunt.registerTask('default', ['sw']);
	
	# Generate docs
	grunt.registerTask 'd', ['shell:groc']

	# Server
	grunt.registerTask 's', ['connect:keepalive']

	# Watch
	grunt.registerTask 'w', ['watch']

	# Server and watch
	grunt.registerTask 'sw', [
		'connect:compiled'
		'connect:dist'
		'connect:test'
		'watch'
	]

	# Compile
	grunt.registerTask 'c', [
		'shell:emptycompiled' # rm -rf compiled/
		'shell:bowerinstall' # Get dependencies first, cuz css needs to be included (and maybe images?)
		'createSymlinks:compiled'
		'coffee:init'
		'jade:init'
		'stylus:compile'
		'concat:css'
	]

	# Build
	grunt.registerTask 'b', [
		'shell:emptydist'
		'createSymlinks:dist'
		'replace:html' # Copy and replace index.html
		'cssmin:dist'
		'requirejs:compile' # Run r.js
		# 'shell:rsync' # Rsync to test server
	]

	grunt.registerTask 'all', ['c', 'd', 'b', 'sw']

	grunt.registerMultiTask 'createSymlinks', 'Creates a symlink', ->
		for own index, config of this.data

				grunt.file.delete testDestPath

		if srcPath.substr(0, 4) is 'test' and action is 'added'
			return false
