-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
116 lines (111 loc) · 4.05 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) {
// 1. All configuration goes here
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
coreModule: {
src: ['app/app.js',
'app/core/tba.core.log.js',
'app/core/tba.core.spin.js',
'app/core/tba.core.fakes.js',
'app/core/tba.core.dom.js',
'app/core/tba.core.async.js',
'app/core/tba.core.array.js',
'app/user/tba.user.controller.js',
'app/user/tba.user.service.js',
'app/shell/tba.shell.js',
'app/project/tba.project.service.js',
'app/event/tba.event.calendar.service.js',
'app/event/tba.event.day.controller.js',
'app/event/tba.event.search.controller.js',
'app/event/tba.event.month.controller.js',
'app/event/tba.event.service.js',
'app/event/tba.event.week.controller.js'],
dest: 'build/app.js',
},
css: {
src: [
'content/bootstrap.min.css',
'content/font-awesome.css',
'content/toastr.css',
'app/css/fullcalendar.css',
'app/css/ark.css',
'app/css/shell.css',
'app/css/login.css',
'app/css/splash.css'
],
dest: 'build/app.css'
},
dist: {
src: [
'scripts/jquery-2.1.1.min.js',
'scripts/angular.min.js',
'scripts/angular-animate.min.js',
'scripts/angular-route.min.js',
'scripts/angular-sanitize.min.js',
'scripts/angular-ui/ui-bootstrap.min.js',
'scripts/angular-ui/ui-bootstrap-tpls.min.js',
'scripts/toastr.min.js',
'scripts/moment.min.js',
'scripts/spin.min.js',
'scripts/fullcalendar.min.js'
],
dest: 'build/libraries.min.js',
},
production: {
src: ['build/libraries.min.js', 'build/app.min.js'],
dest: 'build/production.min.js'
}
},
ngtemplates: {
app: {
src: 'app/**/*.html',
dest: 'app/template.js',
options: {
htmlmin: {
collapseBooleanAttributes: true,
collapseWhitespace: true,
removeAttributeQuotes: true,
removeComments: true,
removeEmptyAttributes: true,
removeRedundantAttributes: true,
removeScriptTypeAttributes: true,
removeStyleLinkTypeAttributes: true
}
}
}
},
uglify: {
build: {
src: 'build/app.js',
dest: 'build/app.min.js'
}
},
watch: {
scripts: {
files: ['app/**/*.*'],
tasks: ['ngtemplates', 'concat', 'uglify'],
options: {
spawn: false,
},
}
},
compress: {
main: {
options: {
mode: 'gzip'
},
expand: true,
cwd: 'js/',
src: ['**/*'],
dest: 'gzip/'
}
}
});
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-angular-templates');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-compress');
grunt.registerTask('default'); //, ['watch']);
};