summaryrefslogtreecommitdiff
path: root/Gruntfile.js
blob: 8a3c6d44a4e75cfc0a65e5157b7614822acd1fc2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
module.exports = function(grunt) {

	// Project configuration.
	grunt.initConfig({
		pkg: grunt.file.readJSON('package.json'),
		concat: {
      options: {
        separator: ';'
      },
			dist: {
				src: [
					'js/vendor/FileSaver/FileSaver.js',
					'js/vendor/dataUriToBlob.js',
          'js/gif-encode/util.js',
          'js/gif-encode/tube.js',
          'js/gif-encode/client.js',
					'js/ui-template.js',
					'js/record.js'
				],
				dest: 'js/record.concat.js',
			},
      worker: {
        src: [
          'js/gif-encode/GIFEncoder.js',
          'js/gif-encode/LZWEncoder.js',
          'js/gif-encode/NeuQuant.js',
          'js/gif-encode/worker.js'
        ],
        dest: 'js/gif-encode/worker.concat.js'
      }
		},
		uglify: {
			options: {
				banner: '/* asdf.us/dither */\n'
			},
			build: {
				src: 'js/record.concat.js',
				dest: 'js/record.min.js'
			}
		},
		watch: {
			files: ['js/!(live.min|live.concat).js','js/vendor/*'],
			tasks: ['default']
		}
	});

	// Load tasks that we'll be using
	grunt.loadNpmTasks('grunt-contrib-concat');
	grunt.loadNpmTasks('grunt-contrib-uglify');
	grunt.loadNpmTasks('grunt-contrib-watch');


	// Default task(s).
	grunt.registerTask('default', ['concat', 'uglify']);
};