-
Notifications
You must be signed in to change notification settings - Fork 6
/
Gruntfile.js
executable file
·92 lines (90 loc) · 2.29 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
module.exports = function(grunt) {
grunt.initConfig({
concat: {
js : {
src : [
'config/constants.js',
'config/routes.js',
'library/util.js',
'library/cowcrypt/convert.js',
'library/cowcrypt/hasher.js',
'library/cowcrypt/md5.js',
'faxrobot.js',
'controllers/_base_modal.js',
'controllers/**/*.js',
'handlers/*.js',
'models/*.js'
],
dest : 'faxrobot.min.js'
}
},
uglify : {
js: {
files: {
'faxrobot.min.js' : [ 'faxrobot.min.js' ]
}
},
libs: {
options: {
preserveComments: 'all'
},
files: {
'library/library.min.js': [
'library/underscore-1.7.0.min.js',
'library/history/History.js',
'library/history/history.adapter.native.js',
'library/composer-1.1.6.5.min.js'
]
}
}
},
less: {
development: {
options: {
compress: true,
yuicompress: true,
optimization: 2
},
files: {
"css/faxrobot.css": "css/less/faxrobot.less"
}
}
},
watch: {
styles: {
files: [
'css/less/*.less',
], // which files to watch
tasks: [
'less'
],
options: {
nospawn: true,
debounceDelay: 250
}
},
scripts: {
files: [
'config/*.js',
'library/util.js',
'faxrobot.js',
'controllers/**/*.js',
'handlers/*.js',
'models/*.js'
],
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']);
};