This repository has been archived by the owner on Dec 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathGruntfile.js
92 lines (84 loc) · 2.35 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) {
require('load-grunt-tasks')(grunt);
var path = require('path');
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
exec: {
revision: {
cmd: 'bin/revision.sh'
},
build: {
cmd: 'bin/build.sh <%= pkg.name %>'
},
zip: {
cmd: 'bin/zip.sh <%= pkg.name %>'
},
build_update: {
cmd: 'bin/build_update.sh <%= pkg.name %>'
},
zip_update: {
cmd: 'bin/zip.sh <%= pkg.name %>_update'
},
build_qd: {
cmd: 'bin/build_qd.sh'
},
make_diff: {
cmd: function(rev) {
return 'bin/diff.sh ' + rev;
}
}
},
cssmin: {
minify: {
files: {
"skin/bootstrap/css/bootstrap-custom.min.css": "skin/bootstrap/css/bootstrap-custom.css",
"plugin/audio/audio.min.css": "plugin/audio/audio.css",
"plugin/video/video.min.css": "plugin/video/video.css",
"js/mediaelementplayer/mediaelementplayer.min.css": "js/mediaelementplayer/mediaelementplayer.css"
}
}
},
coffee: {
app: {
files: {
"js/qhm.js": "js/qhm/**/*.coffee"
}
}
},
uglify: {
app: {
files: {
"js/qhm.min.js": ["js/qhm.js", "js/jquery.fitvids.js"]
}
},
plugin: {
files: {
"plugin/audio/audio.min.js": "plugin/audio/audio.js",
"js/jquery.prettyembed.min.js" : "js/jquery.prettyembed.js",
"plugin/video/video.min.js": "plugin/video/video.js"
}
}
},
watch: {
cssmin: {
files: [
'skin/bootstrap/css/bootstrap-custom.css',
'plugin/audio/audio.css',
'plugin/video/video.css',
'js/mediaelementplayer/mmediaelementplayer.css'
],
tasks: ['cssmin']
},
coffee: {
files: ['js/qhm/**/*.coffee'],
tasks: ['coffee:app', 'uglify:app']
},
uglify: {
files: ['plugin/audio/audio.js','js/jquery.prettyembed.js','plugin/video/video.js'],
tasks: ['uglify:plugin']
}
}
});
grunt.registerTask('build', ['cssmin', 'coffee', 'uglify', 'exec:revision', 'exec:build', 'exec:zip', 'exec:build_update', 'exec:zip_update', 'exec:build_qd']);
grunt.registerTask('default', ['cssmin', 'coffee', 'uglify', 'watch']);
}