This repository has been archived by the owner on Jun 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Gruntfile.js
executable file
·73 lines (71 loc) · 1.68 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
module.exports = function(grunt) {
grunt.initConfig({
concat: {
js : {
src : [
'config/*.js',
'notifications.js',
'controllers/**/*.js',
'handlers/*.js',
'models/*.js'
],
dest : 'js/notifications.min.js'
}
},
uglify : {
js: {
files: {
'js/notifications.min.js' : [ 'js/notifications.min.js' ]
}
}
},
less: {
development: {
options: {
compress: true,
yuicompress: true,
optimization: 2
},
files: {
// target.css file: source.less file
"css/notifications.css": "css/less/notifications.less"
}
}
},
watch: {
styles: {
files: [
'css/less/*.less',
], // which files to watch
tasks: [
'less'
],
options: {
nospawn: true,
debounceDelay: 250
}
},
scripts: {
files: [
'config/*.js',
'notifications.js',
'controllers/**/*.js',
'handlers/*.js',
'models/*.js'
], // which files to watch
tasks: [
'concat' // , 'uglify'
],
options: {
nospawn: true,
debounceDelay: 250
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.registerTask('default', ['watch']);
};