forked from MattSurabian/DuckHunt-JS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
grunt.js
47 lines (44 loc) · 1.33 KB
/
grunt.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
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
lint: {
files: ['grunt.js', 'duckhunt/*.js']
},
min: {
duckhunt: {
src: [
'duckhunt/dog.js',
'duckhunt/duck.js',
'duckhunt/gun.js',
'duckhunt/player.js',
'duckhunt/overlay.js',
'duckhunt/weapons.js',
'duckhunt/levels.js',
'duckhunt/duckhunt.js'
],
dest: 'build/duckhunt.min.js'
},
libs: {
src: [
'lib/jquery.js',
'lib/underscore.js',
'lib/jquery.spritely.js',
'lib/jquery.color.js'
],
dest: 'build/libs.min.js'
}
},
compress: {
build: {
files:{
'build/build.js.gz' : ['build/libs.min.js','build/duckhunt.min.js']
}
}
}
});
// Load plugins
grunt.loadNpmTasks('grunt-contrib-compress');
// Default task(s).
grunt.registerTask('default', ['lint', 'min']);
grunt.registerTask('build', ['lint', 'min','compress']);
};