 docsDirectory = './docs/'
 srcDirectory = './src/'
 tempDirectory = './.temp/'
+### config end ###
 
 bower = require 'gulp-bower'
 clean = require 'gulp-clean'

	gulp
		.src '**/*.coffee', cwd: srcDirectory
		.pipe yuidoc options
		.pipe gulp.dest docsDirectory

###
working on
###
gulp.task 'serve', ['build'], ->
	server = connect.server
		root: [distDirectory]
		port: devPort
		livereload: true

	server()

gulp.task 'watch', ['build'], ->
	gulp
		.watch "#{srcDirectory}**", ['dist']

gulp.task 'dist', ['build'], ->
	connect.reload()
			level: 'ignore'

	gulp
		.src [
			'**/*.coffee'
			'!scripts/app.coffee'
		], cwd: srcDirectory
		.pipe coffeelint options
		.pipe coffeelint.reporter()

gulp.task 'copy:temp', ['clean:working', 'flatten'], ->
	gulp
		.src [
			"#{srcDirectory}**"
			"#{componentsDirectory}**"
		]
		.pipe gulp.dest tempDirectory

gulp.task 'default', ['serve', 'watch', 'build']
