-
Notifications
You must be signed in to change notification settings - Fork 1
/
grunt.js
127 lines (123 loc) · 3.6 KB
/
grunt.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
/*
* grunt
* http://gruntjs.com/
*
* Copyright (c) 2012 "Cowboy" Ben Alman
* Licensed under the MIT license.
* https://github.com/gruntjs/grunt/blob/master/LICENSE-MIT
*/
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
clean: {
all: [
'buildjs/',
'public/javascripts/genesis.min.js',
'public/javascripts/backoffice.min.js'
]
},
lint: {
main: [
'public/javascripts/genesis.min.js'
],
backoffice: [
'public/javascripts/backoffice.min.js'
],
dev:[
'public/javascripts/app/config.js',
'public/javascripts/app/app.js',
'public/javascripts/app/pay.js',
'public/javascripts/app/day.js',
'public/javascripts/app/standby.js',
'public/javascripts/app/calendar.js',
'public/javascripts/app/holiday.js',
'public/javascripts/app/fees.js',
'public/javascripts/app/feesCra.js',
'public/javascripts/app/account/globalSettings.js',
'public/javascripts/app/account/partTimeSetting.js',
'public/javascripts/app/account/changePasswordSetting.js',
'public/javascripts/app/account/feesSetting.js',
'public/javascripts/app/launch.js'
]
},
jshint: {
options: {
curly: true,
eqeqeq: true,
immed: true,
latedef: true,
newcap: true,
noarg: true,
sub: true,
undef: true,
boss: true,
eqnull: true,
node: true,
es5: true,
strict: false
},
globals: {}
},
concat: {
genesis: {
src: [
'public/javascripts/app/config.js',
'public/javascripts/app/app.js',
'public/javascripts/app/pay.js',
'public/javascripts/app/day.js',
'public/javascripts/app/standby.js',
'public/javascripts/app/calendar.js',
'public/javascripts/app/holiday.js',
'public/javascripts/app/fees.js',
'public/javascripts/app/feesCra.js',
'public/javascripts/app/account/globalSettings.js',
'public/javascripts/app/account/partTimeSetting.js',
'public/javascripts/app/account/changePasswordSetting.js',
'public/javascripts/app/account/feesSetting.js',
'public/javascripts/app/launch.js'
],
dest: 'buildjs/genesis.js'
},
backoffice: {
src: [
'public/javascripts/app/backoffice/app.js',
'public/javascripts/app/backoffice/controllers/EmployeesController.js',
'public/javascripts/app/backoffice/controllers/EmployeeController.js',
'public/javascripts/app/backoffice/controllers/CustomersController.js',
'public/javascripts/app/backoffice/controllers/CustomerController.js',
'public/javascripts/app/backoffice/controllers/MissionController.js',
'public/javascripts/app/backoffice/filters/capitalize.js',
'public/javascripts/app/backoffice/directives/bDatepicker.js',
'public/javascripts/app/backoffice/services/EmployeesResource.js',
'public/javascripts/app/backoffice/services/CustomersResource.js',
'public/javascripts/app/backoffice/services/MissionsResource.js',
'public/javascripts/app/backoffice/services/RolesResource.js'
],
dest: 'buildjs/backoffice.js'
}
},
min: {
genesis: {
src: ['buildjs/genesis.js'],
dest: 'public/javascripts/genesis.min.js',
separator: ';'
},
backoffice: {
src: ['buildjs/backoffice.js'],
dest: 'public/javascripts/backoffice.min.js',
separator: ';'
}
},
uglify: {
mangle: {toplevel: true},
squeeze: {dead_code: true},
codegen: {
beautify: false,
quote_keys: true
}
}
});
// Default task.
grunt.registerTask('default', 'lint:dev');
grunt.registerTask('dist', 'concat:genesis min:genesis concat:backoffice min:backoffice');
};