forked from mailpile/Mailpile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
89 lines (85 loc) · 2.87 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
module.exports = function(grunt) {
grunt.registerTask('watch', [ 'watch' ]);
grunt.initConfig({
concat: {
js: {
options: {
separator: ';'
},
src: [
'shared-data/default-theme/js/libraries.js',
'bower_components/jquery/dist/jquery.js',
'bower_components/underscore/underscore.js',
'bower_components/jquery-timer/jquery.timer.js',
'bower_components/autosize/dist/autosize.js',
'bower_components/mousetrap/mousetrap.js',
'shared-data/default-theme/js/mousetrap.global.bind.js',
'bower_components/jquery.ui/ui/jquery.ui.core.js',
'bower_components/jquery.ui/ui/jquery.ui.widget.js',
'bower_components/jquery.ui/ui/jquery.ui.mouse.js',
'bower_components/jquery.ui/ui/jquery.ui.draggable.js',
'bower_components/jquery.ui/ui/jquery.ui.droppable.js',
'bower_components/jquery.ui/ui/jquery.ui.sortable.js',
'bower_components/jqueryui-touch-punch/jquery.ui.touch-punch.js',
'bower_components/qtip2/jquery.qtip.js',
'bower_components/jquery-slugify/dist/slugify.js',
'bower_components/typeahead.js/dist/typeahead.jquery.js',
'bower_components/bootstrap/js/dropdown.js',
'bower_components/bootstrap/js/modal.js',
'bower_components/listjs/dist/list.js',
'bower_components/favico.js/favico.js',
'bower_components/select2/select2.js',
'bower_components/moxie/bin/js/moxie.js',
'bower_components/plupload/js/plupload.min.js',
'bower_components/dompurify/dist/purify.min.js'
],
dest: 'shared-data/default-theme/js/libraries.min.js'
}
},
uglify: {
options: {
mangle: false
},
js: {
files: {
'shared-data/default-theme/js/libraries.min.js': ['shared-data/default-theme/js/libraries.min.js']
}
}
},
less: {
options: {
cleancss: true
},
style: {
files: {
"shared-data/default-theme/css/default.css": "shared-data/default-theme/less/default.less"
}
}
},
watch: {
js: {
files: ['shared-data/default-theme/js/*.js'],
tasks: ['concat:js', 'uglify:js'],
options: {
livereload: true,
}
},
css: {
files: [
'shared-data/default-theme/less/config.less',
'shared-data/default-theme/less/default.less',
'shared-data/default-theme/less/app/*.less',
'shared-data/default-theme/less/libraries/*.less'
],
tasks: ['less:style'],
options: {
livereload: true,
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-watch');
};