-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.js
104 lines (99 loc) · 4.21 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
module.exports = function (grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
dirs: {
jsSrc: 'public/js',
cssSrc: 'public/css',
bowerSrc: 'public/bower_components',
dest: 'public/concat'
},
concat: {
options: {
separator: '\n',
process: function (src, filepath) {
return '/* OriginalFileName : ' + filepath + ' */ \n\n' + src;
}
},
js: {
options: {
separator: ';\n',
},
nonull: true,
dest: '<%= dirs.dest %>/app.js',
src: [
'<%= dirs.bowerSrc %>/jquery/dist/jquery.js',
'<%= dirs.bowerSrc %>/bootstrap/dist/js/bootstrap.js',
'<%= dirs.bowerSrc %>/metisMenu/dist/metisMenu.js',
'<%= dirs.bowerSrc %>/startbootstrap-sb-admin-2/dist/js/sb-admin-2.js',
'<%= dirs.jsSrc %>/confirmation.js',
'<%= dirs.jsSrc %>/ajaxCalls.js',
'<%= dirs.jsSrc %>/general.js',
'<%= dirs.jsSrc %>/moment.js',
'<%= dirs.jsSrc %>/deactivated.js',
'<%= dirs.jsSrc %>/error.js',
'<%= dirs.bowerSrc %>/jt.timepicker/jquery.timepicker.js',
'<%= dirs.bowerSrc %>/jt.timepicker/lib/bootstrap-datepicker.js',
'<%= dirs.bowerSrc %>/jquery-ui/ui/jquery-ui.js',
'<%= dirs.jsSrc %>/time.js',
'<%= dirs.jsSrc %>/date-pick.js',
'<%= dirs.jsSrc %>/accordion.js',
'<%= dirs.jsSrc %>/showrequestscomment.js',
'<%= dirs.bowerSrc %>/bootstrap-datepicker/dist/js/bootstrap-datepicker.js',
'<%= dirs.jsSrc %>/requests_vacation.js',
'<%= dirs.jsSrc %>/currentpage.js',
'<%= dirs.bowerSrc %>/fullcalendar/dist/fullcalendar.min.js',
'<%= dirs.jsSrc %>/calendar.js'
]
},
css: {
nonull: true,
dest: '<%= dirs.dest %>/app.css',
src: [
'<%= dirs.bowerSrc %>/font-awesome/css/font-awesome.css',
'<%= dirs.cssSrc %>/template-styling.css',
'<%= dirs.bowerSrc %>/bootstrap/dist/css/bootstrap.css',
'<%= dirs.bowerSrc %>/startbootstrap-sb-admin-2/dist/css/sb-admin-2.css',
'<%= dirs.bowerSrc %>/startbootstrap-sb-admin-2/dist/css/timeline.css',
'<%= dirs.bowerSrc %>/jquery-ui/themes/smoothness/jquery-ui.css',
'<%= dirs.cssSrc %>/errors_css.css',
'<%= dirs.bowerSrc %>/jt.timepicker/lib/bootstrap-datepicker.css',
'<%= dirs.bowerSrc %>/jt.timepicker/jquery.timepicker.css',
'<%= dirs.cssSrc %>/vacation_request.css',
'<%= dirs.bowerSrc %>/fullcalendar/dist/fullcalendar.css'
]
}
},
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n',
compress: {
global_defs: {
"DEBUG": false
},
dead_code: true,
drop_console: true
},
preserveComments: false
},
dist: {
files: {
'<%= dirs.dest %>/app.min.js': ['<%= dirs.dest %>/app.js']
}
}
},
cssmin: {
dist: {
files: {
'<%= dirs.dest %>/app.min.css': ['<%= dirs.dest %>/app.css']
}
}
}
});
// Load the plugin that provides the required tasks.
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-cssmin');
// Default task(s).
grunt.registerTask('default', ['concat', 'uglify', 'cssmin']);
};