-
Notifications
You must be signed in to change notification settings - Fork 2
/
Gruntfile.js
116 lines (109 loc) · 3.29 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
module.exports = function (grunt) {
'use strict';
grunt.initConfig({
concat: {
js_main: {
src: [
'cup/js/pnotify.custom.min.js',
'cup/js/bootstrap.js',
'cup/js/jquery.viewbox.js',
'cup/js/config.js',
'cup/js/flipclock.js',
'cup/js/google_graphs.js',
'cup/js/jquery.countdown.js',
'cup/js/bootstrap-select.js',
'cup/js/jquery-sortable.js',
'cup/js/cup_functions.js'
],
dest: 'cup/dist/js/scripts.js'
},
css_main: {
src: [
'cup/css/bootstrap-select.css',
'cup/css/viewbox.css',
'cup/css/flipclock.css',
'cup/css/pnotify.custom.min.css',
'cup/css/cup.css',
'cup/css/pages.css',
'cup/css/font.css'
],
dest: 'cup/dist/css/styles.css'
},
css_layout: {
src: [
'cup/css/layout.css'
],
dest: 'cup/dist/css/layout.css'
}
},
uglify: {
js_main: {
files: {
'cup/dist/js/scripts.min.js': [
'cup/dist/js/scripts.js'
]
}
}
},
cssmin: {
css: {
files: {
'cup/dist/css/styles.min.css': [
'cup/dist/css/styles.css'
],
'cup/dist/css/layout.min.css': [
'cup/dist/css/layout.css'
]
}
}
},
watch: {
js: {
files: ['cup/js/**/*.js'],
tasks: [
'concat:js_main',
'uglify:js_main'
]
},
css_static: {
files: [
'cup/css/bootstrap-select.css',
'cup/css/flipclock.css',
'cup/css/pnotify.custom.min.css',
'cup/css/cup.css',
'cup/css/pages.css',
'cup/css/font.css'
],
tasks: [
'concat:css_main',
'cssmin:css'
]
},
css_layout: {
files: [
'cup/css/layout.css'
],
tasks: [
'concat:css_layout',
'cssmin:css'
]
}
}
});
grunt.event.on('watch', function(action, filepath, target) {
grunt.log.writeln(target + ': ' + filepath + ' has ' + action);
});
grunt.registerTask('default', ['concat']);
grunt.registerTask(
'all',
[
'concat',
'cssmin',
'uglify'
]
);
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-cssmin');
};