-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathgruntfile.js
88 lines (82 loc) · 2.99 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
options: {
banner: '/**\n * @link www.couchfriends.com\n * @license MIT\n */\n'
},
build: {
src: [
'src/howler.js',
'src/pixi.js',
'src/pixi.lights.js',
'src/lib.js',
'src/randomcolor.js',
'src/BreakOut.js',
'src/BreakOut.Element.js',
'src/BreakOut.Ball.js',
'src/BreakOut.Paddle.js',
'src/BreakOut.Brick.js',
'src/BreakOut.BrickDeco.js',
'src/BreakOut.BrickStone.js',
'src/BreakOut.BrickFourStones.js',
'src/BreakOut.BrickColorOrange.js',
'src/BreakOut.BrickColorRed.js',
'src/BreakOut.BrickColorPurple.js',
'src/BreakOut.BrickStar.js',
'src/BreakOut.BrickFire.js',
'src/BreakOut.BrickIce.js',
'src/BreakOut.BrickSand.js',
'src/BreakOut.Explosion.js',
'src/BreakOut.Bullet.js',
'src/BreakOut.Asset.js',
'src/BreakOut.AssetFire.js',
'src/BreakOut.AssetBackground.js',
'src/BreakOut.Bonus.js',
'src/BreakOut.BonusCoin.js',
'src/BreakOut.BonusFreeze.js',
'src/BreakOut.BonusSticky.js',
'src/BreakOut.BonusFire.js',
'src/BreakOut.BonusShoot.js',
'src/BreakOut.Text.js',
'src/BreakOut.TextBonus.js',
'src/BreakOut.TextScore.js',
'src/BreakOut.EffectPickup.js',
'src/BreakOut.EffectSparkles.js',
'src/game.js'
],
dest: 'build/game.js'
}
},
less: {
production: {
options: {
plugins: [
new (require('less-plugin-clean-css'))({})
]
},
files: {
"build/game.css": [
'src/game.less'
]
}
}
},
copy: {
main: {
src: 'src/assets/*',
dest: 'build/assets/',
flatten: true,
expand: true,
filter: 'isFile'
}
}
});
// Load the plugin that provides the "uglify" task.
grunt.loadNpmTasks('grunt-contrib-uglify');
// Default task(s).
grunt.registerTask('default', ['uglify', 'less', 'copy']);
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-copy');
};