egroupware/Gruntfile.js

127 lines
4.0 KiB
JavaScript
Raw Normal View History

/**
* 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>
* @copyright (c) 2016-21 by Ralf Becker <rb@egroupware.org>
*/
/**
* To install grunt to build minified javascript files you need to run:
2016-03-01 21:55:21 +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
* 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:
2016-03-01 21:55:21 +01:00
*
* grunt # runs cssmin for all targets with changed files
* 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!
*
* @param {object} grunt
*/
module.exports = function (grunt) {
grunt.initConfig({
cssmin: {
options: {
shorthandCompacting: false,
sourceMap: true,
rebase: true
},
pixelegg: {
files: {
2016-05-05 10:04:57 +02:00
"pixelegg/css/pixelegg.min.css": [
"node_modules/@shoelace-style/shoelace/dist/themes/light.css",
"node_modules/@shoelace-style/shoelace/dist/themes/dark.css",
"pixelegg/css/pixelegg.min.css"
],
2016-05-05 10:04:57 +02:00
"pixelegg/css/mobile.min.css": [
"node_modules/@shoelace-style/shoelace/dist/themes/light.css",
"node_modules/@shoelace-style/shoelace/dist/themes/dark.css",
"pixelegg/css/mobile.min.css"
],
2016-05-05 10:04:57 +02:00
"pixelegg/mobile/fw_mobile.min.css": [
"node_modules/flatpickr/dist/themes/light.css",
2016-05-05 10:04:57 +02:00
"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",
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"
],
"pixelegg/css/monochrome.min.css": [
"node_modules/@shoelace-style/shoelace/dist/themes/light.css",
"node_modules/@shoelace-style/shoelace/dist/themes/dark.css",
"pixelegg/css/monochrome.min.css"
],
"pixelegg/css/modern.min.css": [
"node_modules/@shoelace-style/shoelace/dist/themes/light.css",
"node_modules/@shoelace-style/shoelace/dist/themes/dark.css",
"pixelegg/css/pixelegg.min.css"
],
"pixelegg/css/0.min.css": [
"node_modules/@shoelace-style/shoelace/dist/themes/light.css",
"node_modules/@shoelace-style/shoelace/dist/themes/dark.css",
"pixelegg/css/pixelegg.min.css"
],
"pixelegg/css/1.min.css": [
"node_modules/@shoelace-style/shoelace/dist/themes/light.css",
"node_modules/@shoelace-style/shoelace/dist/themes/dark.css",
"pixelegg/css/pixelegg.min.css"
],
"pixelegg/css/2.min.css": [
"node_modules/@shoelace-style/shoelace/dist/themes/light.css",
"node_modules/@shoelace-style/shoelace/dist/themes/dark.css",
"pixelegg/css/pixelegg.min.css"
],
"pixelegg/css/3.min.css": [
"node_modules/@shoelace-style/shoelace/dist/themes/light.css",
"node_modules/@shoelace-style/shoelace/dist/themes/dark.css",
"pixelegg/css/pixelegg.min.css"
]
}
},
kdots: {
files: {
"kdots/css/kdots.min.css": [
"node_modules/flatpickr/dist/themes/light.css",
"api/templates/default/etemplate2.css",
"kdots/css/kdots.css",
"api/templates/default/print.css"
]
}
}
},
hub: {
all: {
src: [
2016-05-05 10:04:57 +02:00
"*/Gruntfile.js"
]
}
},
terser: null
});
// 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']);
};