-
Notifications
You must be signed in to change notification settings - Fork 98
/
Gruntfile.js
129 lines (125 loc) · 4.31 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
/**
* EGroupware Gruntfile.js
*
* @link http://www.egroupware.org
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @author Ralf Becker <rb@egroupware.org>
* @copyright (c) 2016-21 by Ralf Becker <rb@egroupware.org>
*/
/**
* To install grunt to build minified javascript files you need to run:
*
* sudo npm install -g grunt-cli
* npm install # installs everything from package.json into node_modules dir
*
* To generate the now existing package.json:
* npm init
* npm install grunt --save-dev
* npm install grunt-newer --save-dev
* npm install grunt-contrib-cssmin --save-dev
*
* Building happens by running in your EGroupware directory:
*
* grunt # runs cssmin for all targets with changed files
* or
* grunt [newer:]cssmin:<target> # targets: pixelegg, jdots
*
* Please use only double quotes, as we parse this file as json to update it!
*
* @param {object} grunt
*/
module.exports = function (grunt) {
grunt.initConfig({
cssmin: {
options: {
shorthandCompacting: false,
sourceMap: true,
rebase: true
},
pixelegg: {
files: {
"pixelegg/css/pixelegg.min.css": [
"node_modules/flatpickr/dist/themes/light.css",
"api/js/dhtmlxtree/codebase/dhtmlxtree.css",
"api/js/egw_action/test/skins/dhtmlxmenu_egw.css",
"vendor/bower-asset/diff2html/dist/diff2html.css",
"vendor/bower-asset/cropper/dist/cropper.min.css",
"api/templates/default/css/flags.css",
"api/templates/default/css/htmlarea.css",
"api/templates/default/etemplate2.css",
"pixelegg/css/pixelegg.css",
"api/templates/default/print.css",
"pixelegg/print.css"
],
"pixelegg/css/mobile.min.css": [
"node_modules/flatpickr/dist/themes/light.css",
"api/js/dhtmlxtree/codebase/dhtmlxtree.css",
"api/js/egw_action/test/skins/dhtmlxmenu_egw.css",
"vendor/bower-asset/diff2html/dist/diff2html.css",
"vendor/bower-asset/cropper/dist/cropper.min.css",
"api/templates/default/css/flags.css",
"api/templates/default/css/htmlarea.css",
"api/templates/default/etemplate2.css",
"pixelegg/css/mobile.css",
"api/templates/default/print.css",
"pixelegg/print.css"
],
"pixelegg/mobile/fw_mobile.min.css": [
"node_modules/flatpickr/dist/themes/light.css",
"api/js/dhtmlxtree/codebase/dhtmlxtree.css",
"api/js/egw_action/test/skins/dhtmlxmenu_egw.css",
"api/js/etemplate/lib/jsdifflib/diffview.css",
"vendor/bower-asset/cropper/dist/cropper.min.css",
"api/templates/default/css/flags.css",
"api/templates/default/css/htmlarea.css",
"api/templates/default/etemplate2.css",
"pixelegg/mobile/fw_mobile.css",
"api/templates/default/print.css",
"pixelegg/print.css"
],
"pixelegg/css/monochrome.min.css": [
"node_modules/flatpickr/dist/themes/light.css",
"api/js/dhtmlxtree/codebase/dhtmlxtree.css",
"api/js/egw_action/test/skins/dhtmlxmenu_egw.css",
"vendor/bower-asset/diff2html/dist/diff2html.css",
"vendor/bower-asset/cropper/dist/cropper.min.css",
"api/templates/default/css/flags.css",
"api/templates/default/css/htmlarea.css",
"api/templates/default/etemplate2.css",
"pixelegg/css/monochrome.css",
"api/templates/default/print.css",
"pixelegg/print.css"
],
"pixelegg/css/modern.min.css": [
"node_modules/flatpickr/dist/themes/light.css",
"api/js/dhtmlxtree/codebase/dhtmlxtree.css",
"api/js/egw_action/test/skins/dhtmlxmenu_egw.css",
"vendor/bower-asset/diff2html/dist/diff2html.css",
"vendor/bower-asset/cropper/dist/cropper.min.css",
"api/templates/default/css/flags.css",
"api/templates/default/css/htmlarea.css",
"api/templates/default/etemplate2.css",
"pixelegg/css/pixelegg.css",
"api/templates/default/print.css",
"pixelegg/print.css"
]
}
}
},
hub: {
all: {
src: [
"*/Gruntfile.js"
]
}
}
});
// Load plugin for css minification
grunt.loadNpmTasks("grunt-contrib-cssmin");
// Load the plugin that runs tasks only on modified files
//grunt.loadNpmTasks("grunt-newer");
// uncomment to run Gruntfile.js in apps / sub-directories
//grunt.loadNpmTasks('grunt-hub');
// Default task(s).
grunt.registerTask("default", ["cssmin"]);//, 'hub']);
};