-
Notifications
You must be signed in to change notification settings - Fork 112
Expand file tree
/
Copy pathGruntfile.js
More file actions
80 lines (76 loc) · 2.58 KB
/
Copy pathGruntfile.js
File metadata and controls
80 lines (76 loc) · 2.58 KB
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
/**
* EGroupware Gruntfile.js
*
* @link https://www.egroupware.org
* @license https://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @author Ralf Becker <rb@egroupware.org>
* @copyright (c) 2016-25 by Ralf Becker <rb@egroupware.org>
*/
/**
* This is no longer run via the grunt CLI/npm package (dropped, as both grunt and
* grunt-contrib-cssmin vendor outdated, vulnerable glob/minimatch/js-yaml versions
* with no upstream fix - see GHSA-mh99-v99m-4gvg and related advisories).
*
* This file is kept because build-css.mjs (run via "npm run css") reads the cssmin
* config below through a minimal grunt.initConfig() shim, so the file lists stay a
* single source of truth.
*
* Api\Framework\Bundle::getImportMap() (api/src/Framework/Bundle.php) used to parse
* this file's grunt.initConfig({...}) call by regex for legacy JS bundle info, but
* that was JS bundling/minifying leftover from before rollup and has been removed -
* Bundle.php no longer reads this file at all.
*
* Please use only double quotes, as build-css.mjs parses this file as json.
*
* @param {object} grunt
*/
module.exports = function (grunt) {
grunt.initConfig({
cssmin: {
options: {
shorthandCompacting: false,
sourceMap: true,
rebase: true
},
kdots: {
files: {
"kdots/css/themes/glassy.min.css": [
"node_modules/flatpickr/dist/themes/light.css",
"node_modules/diff2html/bundles/css/diff2html.min.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",
"kdots/css/themes/glassy.css",
"api/templates/default/print.css"
],
"kdots/css/themes/classic.min.css": [
"node_modules/flatpickr/dist/themes/light.css",
"node_modules/diff2html/bundles/css/diff2html.min.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",
"kdots/css/themes/classic.css",
"api/templates/default/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']);
};