-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
119 lines (104 loc) · 4.02 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
117
118
119
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
options: {
process: false,
stripBanners: true
},
app: {
src: [
// libs
'static/js/vendor/angular.min.js',
'static/js/vendor/angular-animate.min.js',
'static/js/vendor/angular-aria.min.js',
'static/js/vendor/angular-cookies.min.js',
'static/js/vendor/angular-resource.min.js',
'static/js/vendor/angular-messages.min.js',
'static/js/vendor/angular-route.min.js',
'static/js/vendor/md-date-time.js',
'static/js/vendor/momentjs.min.js',
'bower_components/angular-material/angular-material.min.js',
'bower_components/hammerjs/hammer.min.js',
// Dealtday
'static/js/app.js',
// Profile
'profile/static/profile/js/*.js',
'profile/static/profile/js/controllers/*.js',
'profile/static/profile/js/directives/*.js',
'profile/static/profile/js/services/*.js',
// Event
'event/static/event/js/*.js',
'event/static/event/js/services/*.js',
'event/static/event/js/directives/*.js',
'event/static/event/js/filters/*.js',
'event/static/event/js/controllers/*.js',
// Answer
'answer/static/answer/js/*.js',
'answer/static/answer/js/services/*.js',
'answer/static/answer/js/directives/*.js',
'answer/static/answer/js/filters/*.js',
'answer/static/answer/js/controllers/*.js',
// Friend
'friends/static/friends/js/*.js',
'friends/static/friends/js/services/*.js',
'friends/static/friends/js/directives/*.js',
'friends/static/friends/js/filters/*.js',
'friends/static/friends/js/controllers/*.js'
],
dest: 'static/js/built/dealtday.js'
},
style: {
src: [
'bower_components/angular-material/angular-material.css',
'static/css/custom-style.css',
'static/css/md-date-time.css'
],
dest: 'static/css/style.css'
}
},
sass: {
dist: {
files: {
'static/css/custom-style.css': 'static/sass/style.scss'
}
}
},
autoprefixer: {
single_file: {
src: 'static/css/style.css',
dest: 'static/css/style.css'
}
},
concurrent: {
devjs: ['concat'],
styles: ['sass', 'autoprefixer']
},
watch: {
styles: {
files: ['**/sass/*.scss'],
tasks: ['sass:dist', 'autoprefixer', 'concat:style'],
options: {
nospawn: true,
spawn: false
}
},
js: {
files: ['static/js/*.js', '**/static/**/js/**/*.js'],
tasks: ['concurrent:devjs'],
options: {
nospawn: true,
spawn: false
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-concurrent');
grunt.loadNpmTasks('grunt-autoprefixer');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default', ['watch']);
grunt.registerTask('js', ['watch:js']);
grunt.registerTask('styles', ['sass']);
};