-
Notifications
You must be signed in to change notification settings - Fork 3
/
gruntfile.js
102 lines (99 loc) · 3.69 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
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
connect: {
example: {
port: 1337
}
},
cssmin: {
sitecss: {
files: {
'dist/assets/css/styles-1.0.16.min.css': [
'bower_components/bootswatch/paper/bootstrap.css',
'bower_components/animate.css/animate.css',
'bower_components/font-awesome/css/font-awesome.css',
'bower_components/toastr/toastr.css',
'bower_components/ngImgCrop/compile/minified/ng-img-crop.css',
'custom_components/css/styles.css'
]
}
}
},
uglify: {
options: {
compress: true,
mangle: false
},
applib: {
src: [
'bower_components/jquery/dist/jquery.js',
'bower_components/bootstrap/dist/js/bootstrap.js',
'bower_components/angular/angular.js',
'bower_components/angular-route/angular-route.js',
'bower_components/firebase/firebase.js',
'bower_components/angularfire/dist/angularfire.js',
'bower_components/ngImgCrop/compile/minified/ng-img-crop.js',
'bower_components/toastr/toastr.js',
'bower_components/angular-messages/angular-messages.js',
'bower_components/angular-animate/angular-animate.js',
'app/app.js',
'app/config.js',
'app/routes.js',
'app/controllers/home-controller.js',
'app/controllers/login-controller.js',
'app/controllers/event-add-controller.js',
'app/controllers/search-controller.js',
'app/directive/locationPicker.js',
'app/directive/google-map.js'
],
dest: 'dist/assets/js/scripts-1.0.0.min.js'
}
},
copy: {
main: {
files: [{
expand: true,
cwd: 'bower_components/font-awesome/fonts',
src: '**',
dest: 'dist/assets/font',
flatten: false,
}],
files: [{
expand: true,
cwd: 'dev/assets/images',
src: '**',
dest: 'dist/assets/images',
flatten: false,
}]
}
},
htmlmin: {
dist: {
options: {
removeComments: true,
collapseWhitespace: true
},
files: {
'dist/pages/shared/header.html': 'dev/pages/shared/header.html',
'dist/pages/home.html': 'dev/pages/home.html',
'dist/pages/login.html': 'dev/pages/login.html',
'dist/pages/eventAdd.html': 'dev/pages/eventAdd.html',
'dist/pages/search.html': 'dev/pages/search.html',
}
}
}
});
grunt.registerTask("dist", [
'cssmin',
'uglify',
'copy',
'htmlmin'
]);
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-htmlmin');
grunt.loadNpmTasks('grunt-connect');
grunt.registerTask('default', 'connect:example');
};