forked from InnovaLangues/MagicWord
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
131 lines (129 loc) · 6.97 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);
grunt.initConfig({
watch: {
files: [
'Gruntfile.js',
'src/MagicWordBundle/Resources/public/js/**',
'src/MagicWordBundle/Resources/public/css/**'
],
tasks: ['uglify', 'less'],
},
less: {
dist: {
options: {
compress: true,
yuicompress: true,
optimization: 2
},
files: {
"web/css/main.css": [
"bower_components/bootstrap/dist/css/bootstrap.css",
"bower_components/font-awesome/css/font-awesome.css",
'src/MagicWordBundle/Resources/public/css/main.css',
"bower_components/FlipClock/compiled/flipclock.css",
'src/MagicWordBundle/Resources/public/css/play.css',
'src/MagicWordBundle/Resources/public/css/end.css',
'src/MagicWordBundle/Resources/public/css/editor.css',
"bower_components/animate.css/animate.min.css",
"bower_components/intro.js/introjs.css",
],
}
}
},
uglify: {
options: {
mangle: false,
sourceMap: true
},
dist: {
files: {
'web/js/main.js': [
"bower_components/jquery/dist/jquery.min.js",
"bower_components/bootstrap/dist/js/bootstrap.min.js",
'web/bundles/fosjsrouting/js/router.js',
'src/MagicWordBundle/Resources/public/js/wordbox.js',
'src/MagicWordBundle/Resources/public/js/wait.js',
'src/MagicWordBundle/Resources/public/js/info.js',
'src/MagicWordBundle/Resources/public/js/main.js',
'src/MagicWordBundle/Resources/public/js/wiktionnary.js',
'src/MagicWordBundle/Resources/public/js/builder.js',
'node_modules/screenfull/dist/screenfull.js'
],
'web/js/edit_round.js': [
"src/MagicWordBundle/Resources/public/js/edit/bologne.js",
"src/MagicWordBundle/Resources/public/js/edit/grid.js",
"src/MagicWordBundle/Resources/public/js/edit/rush.js",
"src/MagicWordBundle/Resources/public/js/edit/objectives.js",
"src/MagicWordBundle/Resources/public/js/edit/constraint.js",
"src/MagicWordBundle/Resources/public/js/edit/combo.js",
"src/MagicWordBundle/Resources/public/js/edit/findword.js",
"src/MagicWordBundle/Resources/public/js/edit/common.js",
],
'web/js/round.js': [
"src/MagicWordBundle/Resources/public/js/round/details.js",
"src/MagicWordBundle/Resources/public/js/round.js",
],
'web/js/play.js': [
"bower_components/jquery-ui/jquery-ui.min.js",
"bower_components/FlipClock/compiled/flipclock.min.js",
"bower_components/howler.js/dist/howler.min.js",
"src/MagicWordBundle/Resources/public/js/play/activity.js",
"src/MagicWordBundle/Resources/public/js/play/clock.js",
"src/MagicWordBundle/Resources/public/js/play/objective-combo.js",
"src/MagicWordBundle/Resources/public/js/play/objective-findword.js",
"src/MagicWordBundle/Resources/public/js/play/objective-constraint.js",
"src/MagicWordBundle/Resources/public/js/play/word.js",
"src/MagicWordBundle/Resources/public/js/play/combo.js",
"src/MagicWordBundle/Resources/public/js/play/grid.js",
"src/MagicWordBundle/Resources/public/js/play/play.js",
"src/MagicWordBundle/Resources/public/js/play/score.js",
"src/MagicWordBundle/Resources/public/js/play/objectives.js",
"src/MagicWordBundle/Resources/public/js/play/sound.js",
"bower_components/jquery-nearest/src/jquery.nearest.min.js",
"bower_components/FitText.js/jquery.fittext.js"
],
'web/js/tutorial.js': [
"bower_components/jquery-ui/jquery-ui.min.js",
"bower_components/FlipClock/compiled/flipclock.min.js",
"bower_components/howler.js/dist/howler.min.js",
"src/MagicWordBundle/Resources/public/js/play/activity.js",
"src/MagicWordBundle/Resources/public/js/play/clock.js",
"src/MagicWordBundle/Resources/public/js/play/objective-combo.js",
"src/MagicWordBundle/Resources/public/js/play/objective-findword.js",
"src/MagicWordBundle/Resources/public/js/play/objective-constraint.js",
"src/MagicWordBundle/Resources/public/js/play/word.js",
"src/MagicWordBundle/Resources/public/js/play/combo.js",
"src/MagicWordBundle/Resources/public/js/play/grid.js",
"src/MagicWordBundle/Resources/public/js/play/score.js",
"src/MagicWordBundle/Resources/public/js/play/objectives.js",
"src/MagicWordBundle/Resources/public/js/play/sound.js",
"src/MagicWordBundle/Resources/public/js/play/tutorial.js",
"bower_components/jquery-nearest/src/jquery.nearest.min.js",
"bower_components/FitText.js/jquery.fittext.js",
"bower_components/intro.js/intro.js"
],
'web/js/translations.js': [
"web/bundles/bazingajstranslation/js/translator.min.js",
"web/js/translations/config.js",
"web/js/translations/*/en.js",
"web/js/translations/*/fr.js"
]
}
}
},
copy: {
// customisation to add font files from CSS libraries:
fonts: {
expand: true,
flatten: true,
cwd: '',
dest: 'web/fonts/',
src: ['bower_components/font-awesome/fonts/*']
}
},
});
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.registerTask('default', ["less", "uglify", "copy:fonts", "watch"]);
};