-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathGruntfile.js
More file actions
108 lines (105 loc) · 3.64 KB
/
Gruntfile.js
File metadata and controls
108 lines (105 loc) · 3.64 KB
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
module.exports = function (grunt) {
'use strict';
// Project configuration
grunt.initConfig({
// Metadata
// Task configuration
coffee: {
dist: {
options: {
bare: true,
join: true
},
files: {
'js/main.js': [
'coffee/config.coffee',
// Events
'coffee/events/car_move_event.coffee',
'coffee/events/pickup_event.coffee',
'coffee/events/drop_event.coffee',
'coffee/events/pickup_zone_vanished_event.coffee',
'coffee/events/drop_zone_vanished_event.coffee',
'coffee/events/game_over_event.coffee',
'coffee/events/start_event.coffee',
'coffee/events/increase_difficulty_event.coffee',
// Utils
'coffee/utils/event_bus.coffee',
// Helpers
'coffee/helpers/browser_helper.coffee',
'coffee/helpers/double_helper.coffee',
'coffee/helpers/point_helper.coffee',
// Structs
'coffee/structs/point.coffee',
// Game
'coffee/game/grid.coffee',
'coffee/game/car.coffee',
'coffee/game/users/source.coffee',
'coffee/game/users/user_engine.coffee',
'coffee/game/zones/zone.coffee',
'coffee/game/zones/pickup_zone.coffee',
'coffee/game/zones/drop_zone.coffee',
'coffee/game/ride_engine.coffee',
'coffee/game/score_manager.coffee',
// Presenters
'coffee/presenters/popup_manager.coffee',
'coffee/presenters/home_presenter.coffee',
'coffee/main.coffee'
]
}
}
},
jade: {
dist: {
options: {
pretty: true
},
files: {
'index.html': 'jade/home.jade'
}
}
},
sass: {
dist: {
options: {
sourcemap: 'none'
},
files: {
'css/home.css': 'sass/home.scss'
}
}
},
watch: {
coffee: {
files: 'coffee/**/*.coffee',
tasks: ['coffee'],
options: {
interrupt: true,
atBegin: true
}
},
jade: {
files: 'jade/**/*.jade',
tasks: ['jade'],
options: {
interrupt: true,
atBegin: true
}
},
sass: {
files: 'sass/**/*.scss',
tasks: ['sass'],
options: {
interrupt: true,
atBegin: true
}
}
}
});
// These plugins provide necessary tasks
grunt.loadNpmTasks('grunt-contrib-coffee');
grunt.loadNpmTasks('grunt-contrib-jade');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
// Default task
grunt.registerTask('default', ['coffee', 'sass', 'jade']);
};