 module.exports = (grunt) ->
+
+	appConfig =
+		src:	'src',
+		dist:	'dist',
+		docs:	'docs'
+
 	grunt.initConfig
+
+		config : appConfig
 
 		jade:
 			options:

				sourcemap: "none"
			app:
				files:
					['docs/assets/css/stones.css': 'src/sass/stones.sass','build/stones.css': 'src/sass/stones.sass']
				require: ['sass-json-vars']
				noCache: true
				debugInfo: true

		coffeelint:
			app:
				files:
					src: ['<%= config.src %>/coffee/**/*.coffee']

		coffee:
			options:
				sourceMap: false
			app:
				files:
					['<%= config.docs %>/assets/js/stones.js': '<%= config.src %>/coffee/**/*.coffee','<%= config.dist %>/js/stones.js': '<%= config.src %>/coffee/**/*.coffee']

		copy:
			main:
				files: [
					{
						expand: true
						cwd: '<%= config.src %>/imgs'
						src: '**/*'
						dest: '<%= config.dist %>/imgs'
					},
					{
						expand: true
						cwd: '<%= config.src %>/imgs'
						src: '**/*'
						dest: '<%= config.docs %>/assets/imgs'
					},
					{
						expand: true
						cwd: '<%= config.src %>/fonts'
						src: '**/*'
						dest: '<%= config.dist %>/fonts'
					},
					{
						expand: true
						cwd: '<%= config.src %>/fonts'
						src: '**/*'
						dest: '<%= config.docs %>/assets/fonts'
					}
				]

		watch:
			jade:
				files: ['<%= config.src %>/views/**/*.jade']
				tasks: ['jade', 'notify:watch']

			coffee:
				files: ['<%= config.src %>/coffee/**/*.coffee']
				tasks: ['coffeelint', 'coffee', 'notify:watch']

			sass:
				files: ['<%= config.src %>/sass/**/*.sass']
				tasks: ['sass', 'notify:watch']

			imgs:
				files: ['<%= config.src %>/imgs/*']
				tasks: ['copy', 'notify:watch']

			fonts:
				files: ['<%= config.src %>/fonts/*']
				tasks: ['copy', 'notify:watch']

			build:
				files: ['<%= config.docs %>/assets/css/stone.css', '<%= config.docs %>/*.html', '<%= config.docs %>/assets/js/stones.js']
				options:
					livereload: true

