forked from jsantell/dancer.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
50 lines (47 loc) · 1.25 KB
/
Gruntfile.js
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
module.exports = function(grunt) {
var banner = '/*\n' +
' * <%= pkg.name %> - v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %>\n' +
' * <%= pkg.homepage %>\n' +
' * Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>\n' +
' * Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %>\n' +
' */\n';
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
options: {
banner: banner
},
build: {
src: [
'src/dancer.js',
'src/support.js',
'src/kick.js',
'src/adapterWebAudio.js',
'src/adapterMoz.js',
'src/adapterFlash.js',
'lib/fft.js',
'lib/flash_detect.js'
],
dest: 'dancer.js'
}
},
uglify: {
options: {
banner: banner
},
build: {
src: ['dancer.js'],
dest: 'dancer.min.js'
}
},
watch: {
scripts: {
files: '<config:concat.dist.src>',
tasks: 'concat min'
}
}
});
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.registerTask('default', ['concat','uglify']);
};