This repository has been archived by the owner on Oct 3, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
grunt.js
89 lines (81 loc) · 2.87 KB
/
grunt.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
// Config file for Javascript minification and concatenation.
// See http://gruntjs.com/
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-mincss');
grunt.loadNpmTasks('grunt-wrap');
var debikiDesktopFiles = [
// 'build/client/debiki/debiki-action-delete.js', // remove
'build/client/debiki/debiki-arrows-png.js',
//'build/client/debiki/debiki-arrows-svg.js', // what? remove!?
'build/client/debiki/debiki-form-anims.js',
'build/client/debiki/debiki-jquery-find.js',
'build/client/debiki/debiki-post-header.js',
'build/client/debiki/debiki-resize.js',
'build/client/debiki/debiki-scroll-into-view.js',
'build/client/debiki/debiki-show-and-highlight.js',
'build/client/debiki/debiki-util.js',
'build/client/debiki/debiki-util-browser.js',
'build/client/debiki/debiki-utterscroll-init-tips.js',
'build/client/debiki/debiki-utterscroll.js',
'build/client/vendor/jquery-scrollable.js',
'build/client/debiki/debiki.js'];
var debikiTouchFiles = [
'build/client/debiki/android-zoom-bug-workaround.js',
'build/client/debiki/debiki-arrows-png.js',
//'build/client/debiki/debiki-arrows-svg.js', // what? remove!?
'build/client/debiki/debiki-form-anims.js',
'build/client/debiki/debiki-jquery-find.js',
'build/client/debiki/debiki-post-header.js',
'build/client/debiki/debiki-resize.js',
'build/client/debiki/debiki-scroll-into-view.js',
'build/client/debiki/debiki-show-and-highlight.js',
'build/client/debiki/debiki-util.js',
'build/client/debiki/debiki-util-browser.js',
'build/client/debiki/debiki.js'];
grunt.initConfig({
pkg: '<json:package.json>',
banner: grunt.file.read('client/banner.js'),
meta: {
name: 'Debiki WordPress Comments',
banner: '<%= banner %>'
},
wrap: {
modules: {
src: 'client/**/*.js',
dest: 'build/',
wrapper: ['(function() {\n', '\n})();']
}
},
/* This results in malfunctioning CSS.
mincss: {
compress: {
files: {
"client/combined-debiki.css": [
"client/vendor/jquery-ui/jquery-ui-1.8.16.custom.css",
"client/debiki/debiki.css"]
}
}
}, */
concat: {
'client/combined-debiki-desktop.js': debikiDesktopFiles,
'client/combined-debiki-touch.js': debikiTouchFiles,
'client/combined-debiki.css': [
'client/banner.css',
'client/vendor/jquery-ui/jquery-ui-1.8.16.custom.css',
'client/debiki/debiki.css']
//'client/combined-debiki.css']
},
min: {
'client/combined-debiki-desktop.min.js': [
'<banner>',
'client/combined-debiki-desktop.js'
],
'client/combined-debiki-touch.min.js': [
'<banner>',
'client/combined-debiki-touch.js'
]
},
});
grunt.registerTask('default', 'wrap concat min');
};
// vim: et ts=2 sw=2 list