module.exports = function (grunt) {

	grunt.initConfig({

		pkg: grunt.file.readJSON('package.json'),

		browserSync: {
			dev: {
				bsFiles: {
					src: 'build/demo/**.*'
				},
				options: {
					watchTask: true,
					server: 'build/demo',
					index: 'video.html'
				}
			}
		},

		clean: {
			build: {
				src: "build"
			},
			demo: {
				src: "build/demo"
			},
			docs: {
				src: "docs"
			},
			library: {
				src: "build/*.js"
			}
		},

		copy: {
			demo: {
				files: [
					{
						expand: true,
						cwd: 'source/',
						src: ['demo/**/*.html', 'demo/**/*.css', 'demo/**/*.js'],
						dest: 'build/'
					},
					{
						expand: true,
						cwd: 'source/',
						src: ['clever-video.js'],
						dest: 'build/demo/_assets/scripts/'
					}
				],
				options: {
					noProcess: ['**/*.css', '**/*.js'],
					process: function(content, srcpath) {
						grunt.log.writeln('Modifying path to clever-video.js in build copy of ' + srcpath + '.');
						return content.replace('../clever-video.js', './_assets/scripts/clever-video.js');
					}
				}
			},
			docs: {
				files: [
					{
						src: 'build/demo/video.html',
						dest: 'docs/index.html'
					},
					{
						expand: true,
						cwd: 'build/demo',
						src: '_assets/**',
						dest: 'docs/'
					}
				]
			},
			library: {

				expand: true,
				cwd: 'source/',
				src: ['clever-video.js'],
				dest: 'build/'
			}
		},

		uglify: {
			build: {
				files: {
					'build/clever-video.min.js': ['source/clever-video.js']
				}
			}
		},

		watch: {
			demo: {
				files: 'source/demo/**/*.*',
				tasks: ['copy:demo']
			},
			library: {
				files: 'source/*.js',
				tasks: ['copy:library', 'uglify']
			}
		}
	});

	grunt.loadNpmTasks('grunt-browser-sync');
	grunt.loadNpmTasks('grunt-contrib-clean');
	grunt.loadNpmTasks('grunt-contrib-copy');
	grunt.loadNpmTasks('grunt-contrib-uglify');
	grunt.loadNpmTasks('grunt-contrib-watch');

	grunt.registerTask('build', ['clean', 'copy', 'uglify']);

	grunt.registerTask('finalize-docs', 'Finalize the docs directory for publishing.', function() {

		grunt.file.write('docs/.nojekyll', '');
	});

	grunt.registerTask('default', ['build', 'browserSync', 'watch']);
};
@@ -279,16 +279,236 @@
 %7D%0A%09%09%7D,%0A%0A
+%09%09build: %7B%0A%09%09%09demo: %7B%0A%09%09%09%09tasks: %5B'clean:demo', 'copy:demo'%5D%0A%09%09%09%7D,%0A%09%09%09docs: %7B%0A%09%09%09%09tasks: %5B'clean:docs', 'copy:docs', 'finalize-docs'%5D%0A%09%09%09%7D,%0A%09%09%09library: %7B%0A%09%09%09%09tasks: %5B'clean:library', 'copy:library', 'uglify'%5D%0A%09%09%09%7D%0A%09%09%7D,%0A%0A
 %09%09clean:
@@ -2139,24 +2139,29 @@
 unt.register
+Multi
 Task('build'
@@ -2166,35 +2166,112 @@
 d', 
-%5B'clean', 'copy', 'uglify'%5D
+'Build all the things! Or just some of the things.', function() %7B%0A%0A%09%09grunt.task.run(this.data.tasks);%0A%09%7D
 );%0A%0A

Replace the build task with a more flexible multi task that can build the library, local demo, or public demo (in the "docs" directory for GitHub Pages).