-
Notifications
You must be signed in to change notification settings - Fork 2
/
Gruntfile.js
46 lines (45 loc) · 1.2 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
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
options: {
mangle: {
toplevel: true,
eval: true,
keep_fnames: false,
reserved: ["startGame"]
}
},
build: {
files: [{
expand: false,
src: ["assets/js/menu.js",
"assets/js/audio.js",
"assets/js/projectile.js",
"assets/js/camera.js",
"assets/js/cart.js",
"assets/js/enums.js",
"assets/js/tile.js",
"assets/js/utility.js",
"assets/js/level.js",
"assets/js/entity.js",
"assets/js/hero.js",
"assets/js/game.js",
"assets/js/keys.js",
"assets/js/mob.js",
],
dest: 'dst/game.min.js',
ext: '.min.js'
}]
}
},
watch: {
files: ['assets/js/*.js'],
tasks: ['uglify']
}
});
grunt.loadNpmTasks('grunt-contrib-uglify-es');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default', ['uglify']);
};