2016-02-28 22:35:24 +01:00
|
|
|
/**
|
|
|
|
* EGroupware Gruntfile.js
|
|
|
|
*
|
|
|
|
* @link http://www.egroupware.org
|
|
|
|
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
|
2016-10-08 14:32:58 +02:00
|
|
|
* @author Ralf Becker <rb@egroupware.org>
|
2021-07-02 15:24:12 +02:00
|
|
|
* @copyright (c) 2016-21 by Ralf Becker <rb@egroupware.org>
|
2016-02-28 22:35:24 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* To install grunt to build minified javascript files you need to run:
|
2016-03-01 21:55:21 +01:00
|
|
|
*
|
2016-02-28 22:35:24 +01:00
|
|
|
* sudo npm install -g grunt-cli
|
2016-05-24 10:02:34 +02:00
|
|
|
* npm install # installs everything from package.json into node_modules dir
|
|
|
|
*
|
|
|
|
* To generate the now existing package.json:
|
|
|
|
* npm init
|
2016-02-28 22:35:24 +01:00
|
|
|
* npm install grunt --save-dev
|
2016-03-02 21:00:41 +01:00
|
|
|
* npm install grunt-newer --save-dev
|
2016-04-30 11:29:54 +02:00
|
|
|
* npm install grunt-contrib-cssmin --save-dev
|
2016-02-28 22:35:24 +01:00
|
|
|
*
|
|
|
|
* Building happens by running in your EGroupware directory:
|
2016-03-01 21:55:21 +01:00
|
|
|
*
|
2021-07-02 15:24:12 +02:00
|
|
|
* grunt # runs cssmin for all targets with changed files
|
2016-04-30 11:29:54 +02:00
|
|
|
* or
|
|
|
|
* grunt [newer:]cssmin:<target> # targets: pixelegg, jdots
|
2016-03-01 21:55:21 +01:00
|
|
|
*
|
|
|
|
* Please use only double quotes, as we parse this file as json to update it!
|
|
|
|
*
|
2016-02-28 22:35:24 +01:00
|
|
|
* @param {object} grunt
|
|
|
|
*/
|
|
|
|
module.exports = function (grunt) {
|
|
|
|
grunt.initConfig({
|
2016-04-30 11:29:54 +02:00
|
|
|
cssmin: {
|
|
|
|
options: {
|
|
|
|
shorthandCompacting: false,
|
|
|
|
sourceMap: true,
|
2016-05-02 10:29:07 +02:00
|
|
|
rebase: true
|
2016-04-30 11:29:54 +02:00
|
|
|
},
|
|
|
|
pixelegg: {
|
|
|
|
files: {
|
2016-05-05 10:04:57 +02:00
|
|
|
"pixelegg/css/pixelegg.min.css": [
|
|
|
|
"api/js/jquery/chosen/chosen.css",
|
2021-08-12 14:51:38 +02:00
|
|
|
"node_modules/jquery-ui-themes/themes/redmond/jquery-ui.css",
|
2018-06-21 13:39:00 +02:00
|
|
|
"vendor/egroupware/magicsuggest/magicsuggest.css",
|
2016-05-05 10:04:57 +02:00
|
|
|
"api/js/jquery/jquery-ui-timepicker-addon.css",
|
|
|
|
"api/js/jquery/blueimp/css/blueimp-gallery.min.css",
|
|
|
|
"api/js/dhtmlxtree/codebase/dhtmlxtree.css",
|
|
|
|
"api/js/egw_action/test/skins/dhtmlxmenu_egw.css",
|
2019-03-01 20:12:17 +01:00
|
|
|
"vendor/bower-asset/diff2html/dist/diff2html.css",
|
2017-11-09 17:23:49 +01:00
|
|
|
"vendor/bower-asset/cropper/dist/cropper.min.css",
|
2018-12-12 17:00:14 +01:00
|
|
|
"api/templates/default/css/flags.css",
|
|
|
|
"api/templates/default/css/htmlarea.css",
|
2019-04-03 14:42:03 +02:00
|
|
|
"api/templates/default/def_tutorials.css",
|
2019-10-21 19:14:00 +02:00
|
|
|
"api/templates/default/etemplate2.css",
|
2016-05-05 10:04:57 +02:00
|
|
|
"pixelegg/css/pixelegg.css",
|
|
|
|
"api/templates/default/print.css",
|
2018-12-12 17:00:14 +01:00
|
|
|
"pixelegg/print.css"
|
2016-04-30 11:29:54 +02:00
|
|
|
],
|
2016-05-05 10:04:57 +02:00
|
|
|
"pixelegg/css/mobile.min.css": [
|
|
|
|
"api/js/jquery/chosen/chosen.css",
|
2021-08-12 14:51:38 +02:00
|
|
|
"node_modules/jquery-ui-themes/themes/redmond/jquery-ui.css",
|
2018-06-21 13:39:00 +02:00
|
|
|
"vendor/egroupware/magicsuggest/magicsuggest.css",
|
2016-05-05 10:04:57 +02:00
|
|
|
"api/js/jquery/jquery-ui-timepicker-addon.css",
|
|
|
|
"api/js/jquery/blueimp/css/blueimp-gallery.min.css",
|
|
|
|
"api/js/dhtmlxtree/codebase/dhtmlxtree.css",
|
|
|
|
"api/js/egw_action/test/skins/dhtmlxmenu_egw.css",
|
2019-03-01 20:12:17 +01:00
|
|
|
"vendor/bower-asset/diff2html/dist/diff2html.css",
|
2017-11-09 17:23:49 +01:00
|
|
|
"vendor/bower-asset/cropper/dist/cropper.min.css",
|
2018-12-12 17:00:14 +01:00
|
|
|
"api/templates/default/css/flags.css",
|
|
|
|
"api/templates/default/css/htmlarea.css",
|
2019-10-21 19:14:00 +02:00
|
|
|
"api/templates/default/def_tutorials.css",
|
2016-05-05 10:04:57 +02:00
|
|
|
"api/templates/default/etemplate2.css",
|
|
|
|
"pixelegg/css/mobile.css",
|
|
|
|
"api/templates/default/print.css",
|
2018-12-12 17:00:14 +01:00
|
|
|
"pixelegg/print.css"
|
2016-04-30 11:29:54 +02:00
|
|
|
],
|
2016-05-05 10:04:57 +02:00
|
|
|
"pixelegg/mobile/fw_mobile.min.css": [
|
|
|
|
"api/js/jquery/chosen/chosen.css",
|
2021-08-12 14:51:38 +02:00
|
|
|
"node_modules/jquery-ui-themes/themes/redmond/jquery-ui.css",
|
2018-06-21 13:39:00 +02:00
|
|
|
"vendor/egroupware/magicsuggest/magicsuggest.css",
|
2016-05-05 10:04:57 +02:00
|
|
|
"api/js/jquery/jquery-ui-timepicker-addon.css",
|
|
|
|
"api/js/jquery/blueimp/css/blueimp-gallery.min.css",
|
|
|
|
"api/js/dhtmlxtree/codebase/dhtmlxtree.css",
|
|
|
|
"api/js/egw_action/test/skins/dhtmlxmenu_egw.css",
|
|
|
|
"api/js/etemplate/lib/jsdifflib/diffview.css",
|
2017-03-06 17:36:30 +01:00
|
|
|
"vendor/bower-asset/cropper/dist/cropper.min.css",
|
2018-12-12 17:00:14 +01:00
|
|
|
"api/templates/default/css/flags.css",
|
|
|
|
"api/templates/default/css/htmlarea.css",
|
2016-05-05 10:04:57 +02:00
|
|
|
"api/templates/default/etemplate2.css",
|
|
|
|
"pixelegg/mobile/fw_mobile.css",
|
|
|
|
"api/templates/default/print.css",
|
|
|
|
"pixelegg/print.css"
|
2017-03-06 17:36:30 +01:00
|
|
|
],
|
2019-03-05 14:19:26 +01:00
|
|
|
"pixelegg/css/monochrome.min.css": [
|
2018-12-12 17:00:14 +01:00
|
|
|
"api/js/jquery/chosen/chosen.css",
|
2021-08-12 14:51:38 +02:00
|
|
|
"node_modules/jquery-ui-themes/themes/redmond/jquery-ui.css",
|
2018-12-12 17:00:14 +01:00
|
|
|
"vendor/egroupware/magicsuggest/magicsuggest.css",
|
|
|
|
"api/js/jquery/jquery-ui-timepicker-addon.css",
|
|
|
|
"api/js/jquery/blueimp/css/blueimp-gallery.min.css",
|
|
|
|
"api/js/dhtmlxtree/codebase/dhtmlxtree.css",
|
|
|
|
"api/js/egw_action/test/skins/dhtmlxmenu_egw.css",
|
2019-03-01 20:12:17 +01:00
|
|
|
"vendor/bower-asset/diff2html/dist/diff2html.css",
|
2018-12-12 17:00:14 +01:00
|
|
|
"vendor/bower-asset/cropper/dist/cropper.min.css",
|
|
|
|
"api/templates/default/css/flags.css",
|
|
|
|
"api/templates/default/css/htmlarea.css",
|
2019-04-03 14:42:03 +02:00
|
|
|
"api/templates/default/def_tutorials.css",
|
2019-10-21 19:14:00 +02:00
|
|
|
"api/templates/default/etemplate2.css",
|
2019-03-05 14:19:26 +01:00
|
|
|
"pixelegg/css/monochrome.css",
|
2018-12-12 17:00:14 +01:00
|
|
|
"api/templates/default/print.css",
|
|
|
|
"pixelegg/print.css"
|
2020-05-28 19:48:44 +02:00
|
|
|
],
|
|
|
|
"pixelegg/css/modern.min.css": [
|
|
|
|
"api/js/jquery/chosen/chosen.css",
|
2021-08-12 14:51:38 +02:00
|
|
|
"node_modules/jquery-ui-themes/themes/redmond/jquery-ui.css",
|
2020-05-28 19:48:44 +02:00
|
|
|
"vendor/egroupware/magicsuggest/magicsuggest.css",
|
|
|
|
"api/js/jquery/jquery-ui-timepicker-addon.css",
|
|
|
|
"api/js/jquery/blueimp/css/blueimp-gallery.min.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/def_tutorials.css",
|
|
|
|
"api/templates/default/etemplate2.css",
|
|
|
|
"pixelegg/css/pixelegg.css",
|
|
|
|
"api/templates/default/print.css",
|
|
|
|
"pixelegg/print.css"
|
2016-04-30 11:29:54 +02:00
|
|
|
]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
jdots: {
|
|
|
|
files: {
|
2016-05-05 10:04:57 +02:00
|
|
|
"jdots/css/high-contrast.min.css": [
|
|
|
|
"api/js/jquery/chosen/chosen.css",
|
2021-08-12 14:51:38 +02:00
|
|
|
"node_modules/jquery-ui-themes/themes/redmond/jquery-ui.css",
|
2018-06-21 13:39:00 +02:00
|
|
|
"vendor/egroupware/magicsuggest/magicsuggest.css",
|
2016-05-05 10:04:57 +02:00
|
|
|
"api/js/jquery/jquery-ui-timepicker-addon.css",
|
|
|
|
"api/js/jquery/blueimp/css/blueimp-gallery.min.css",
|
|
|
|
"api/js/dhtmlxtree/codebase/dhtmlxtree.css",
|
|
|
|
"api/js/egw_action/test/skins/dhtmlxmenu_egw.css",
|
2019-03-01 20:12:17 +01:00
|
|
|
"vendor/bower-asset/diff2html/dist/diff2html.css",
|
2017-11-09 17:23:49 +01:00
|
|
|
"vendor/bower-asset/cropper/dist/cropper.min.css",
|
2018-12-12 17:00:14 +01:00
|
|
|
"api/templates/default/css/flags.css",
|
|
|
|
"api/templates/default/css/htmlarea.css",
|
2016-05-05 10:04:57 +02:00
|
|
|
"api/templates/default/def_tutorials.css",
|
2019-10-21 19:14:00 +02:00
|
|
|
"api/templates/default/etemplate2.css",
|
2016-05-05 10:04:57 +02:00
|
|
|
"api/templates/default/default.css",
|
|
|
|
"jdots/egw_fw.css",
|
|
|
|
"jdots/css/jdots.css",
|
|
|
|
"jdots/css/high-contrast.css",
|
|
|
|
"api/templates/default/print.css",
|
2018-12-12 17:00:14 +01:00
|
|
|
"jdots/print.css"
|
2016-04-30 11:29:54 +02:00
|
|
|
],
|
2016-05-05 10:04:57 +02:00
|
|
|
"jdots/css/jdots.min.css": [
|
|
|
|
"api/js/jquery/chosen/chosen.css",
|
2021-08-12 14:51:38 +02:00
|
|
|
"node_modules/jquery-ui-themes/themes/redmond/jquery-ui.css",
|
2018-06-21 13:39:00 +02:00
|
|
|
"vendor/egroupware/magicsuggest/magicsuggest.css",
|
2016-05-05 10:04:57 +02:00
|
|
|
"api/js/jquery/jquery-ui-timepicker-addon.css",
|
|
|
|
"api/js/jquery/blueimp/css/blueimp-gallery.min.css",
|
|
|
|
"api/js/dhtmlxtree/codebase/dhtmlxtree.css",
|
|
|
|
"api/js/egw_action/test/skins/dhtmlxmenu_egw.css",
|
2019-03-01 20:12:17 +01:00
|
|
|
"vendor/bower-asset/diff2html/dist/diff2html.css",
|
2017-11-09 17:23:49 +01:00
|
|
|
"vendor/bower-asset/cropper/dist/cropper.min.css",
|
2018-12-12 17:00:14 +01:00
|
|
|
"api/templates/default/css/flags.css",
|
|
|
|
"api/templates/default/css/htmlarea.css",
|
2016-05-05 10:04:57 +02:00
|
|
|
"api/templates/default/def_tutorials.css",
|
2019-10-21 19:14:00 +02:00
|
|
|
"api/templates/default/etemplate2.css",
|
2016-05-05 10:04:57 +02:00
|
|
|
"api/templates/default/default.css",
|
|
|
|
"jdots/egw_fw.css",
|
|
|
|
"jdots/css/jdots.css",
|
|
|
|
"api/templates/default/print.css",
|
2018-12-12 17:00:14 +01:00
|
|
|
"jdots/print.css"
|
2016-04-30 11:29:54 +02:00
|
|
|
],
|
2016-05-05 10:04:57 +02:00
|
|
|
"jdots/css/orange-green.min.css": [
|
|
|
|
"api/js/jquery/chosen/chosen.css",
|
2021-08-12 14:51:38 +02:00
|
|
|
"node_modules/jquery-ui-themes/themes/redmond/jquery-ui.css",
|
2018-06-21 13:39:00 +02:00
|
|
|
"vendor/egroupware/magicsuggest/magicsuggest.css",
|
2016-05-05 10:04:57 +02:00
|
|
|
"api/js/jquery/jquery-ui-timepicker-addon.css",
|
|
|
|
"api/js/jquery/blueimp/css/blueimp-gallery.min.css",
|
|
|
|
"api/js/dhtmlxtree/codebase/dhtmlxtree.css",
|
|
|
|
"api/js/egw_action/test/skins/dhtmlxmenu_egw.css",
|
2019-03-01 20:12:17 +01:00
|
|
|
"vendor/bower-asset/diff2html/dist/diff2html.css",
|
2017-11-09 17:23:49 +01:00
|
|
|
"vendor/bower-asset/cropper/dist/cropper.min.css",
|
2018-12-12 17:00:14 +01:00
|
|
|
"api/templates/default/css/flags.css",
|
|
|
|
"api/templates/default/css/htmlarea.css",
|
2016-05-05 10:04:57 +02:00
|
|
|
"api/templates/default/def_tutorials.css",
|
2019-10-21 19:14:00 +02:00
|
|
|
"api/templates/default/etemplate2.css",
|
2016-05-05 10:04:57 +02:00
|
|
|
"api/templates/default/default.css",
|
|
|
|
"jdots/egw_fw.css",
|
|
|
|
"jdots/css/jdots.css",
|
|
|
|
"jdots/css/orange-green.css",
|
|
|
|
"api/templates/default/print.css",
|
2018-12-12 17:00:14 +01:00
|
|
|
"jdots/print.css"
|
2016-04-30 11:29:54 +02:00
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
2016-05-02 12:28:35 +02:00
|
|
|
},
|
|
|
|
hub: {
|
|
|
|
all: {
|
2016-05-02 14:31:24 +02:00
|
|
|
src: [
|
2016-05-05 10:04:57 +02:00
|
|
|
"*/Gruntfile.js"
|
2016-05-02 14:31:24 +02:00
|
|
|
]
|
2016-05-02 12:28:35 +02:00
|
|
|
}
|
2016-02-28 22:35:24 +01:00
|
|
|
}
|
|
|
|
});
|
2016-04-30 11:29:54 +02:00
|
|
|
// Load plugin for css minificaton
|
2020-05-28 19:48:44 +02:00
|
|
|
grunt.loadNpmTasks("grunt-contrib-cssmin");
|
2016-04-30 11:29:54 +02:00
|
|
|
|
2016-03-02 21:00:41 +01:00
|
|
|
// Load the plugin that runs tasks only on modified files
|
2020-05-28 19:48:44 +02:00
|
|
|
grunt.loadNpmTasks("grunt-newer");
|
2016-03-02 21:00:41 +01:00
|
|
|
|
2016-05-25 15:06:04 +02:00
|
|
|
// uncomment to run Gruntfile.js in apps / sub-directories
|
|
|
|
//grunt.loadNpmTasks('grunt-hub');
|
2016-05-02 12:28:35 +02:00
|
|
|
|
2016-02-28 22:35:24 +01:00
|
|
|
// Default task(s).
|
2021-06-29 17:01:49 +02:00
|
|
|
grunt.registerTask("default", ["newer:cssmin"]);//, 'hub']);
|
2016-02-28 22:35:24 +01:00
|
|
|
};
|