1// https://laravel-mix.com 2const mix = require("laravel-mix"); 3 4// https://github.com/postcss/autoprefixer 5const autoprefixer = require("autoprefixer")(); 6 7// https://github.com/jakob101/postcss-inline-rtl 8const postcss_rtl = require("postcss-rtl")(); 9 10// https://github.com/bezoerb/postcss-image-inliner 11const postcss_image_inliner = require("postcss-image-inliner")({ 12 assetPaths: ["resources/css"], 13}); 14 15// https://github.com/postcss/postcss-custom-properties 16// Enable CSS variables in IE 17const postcss_custom_properties = require("postcss-custom-properties")(); 18 19// https://github.com/postcss/postcss 20const postCssPlugins = [ 21 autoprefixer, 22 postcss_image_inliner, 23 postcss_rtl, 24 postcss_custom_properties, 25]; 26 27mix 28 .autoload({ 29 jquery: ["$", "jQuery"], 30 }) 31 .sourceMaps() 32 .js("resources/js/vendor.js", "public/js/vendor.min.js") 33 .babel("resources/js/webtrees.js", "public/js/webtrees.min.js") 34 .copy("node_modules/@fortawesome/fontawesome-free/webfonts/*", "public/webfonts/") 35 .copy("node_modules/leaflet/dist/images/*", "public/css/images/") 36 .copy("node_modules/dejavu-fonts-ttf/ttf/DejaVuSans.ttf", "resources/fonts/") 37 .copy("resources/css/colors/*", "public/css/colors/") 38 .styles(["resources/css/common.css", "resources/css/clouds.css"], "resources/css/clouds.temp.css") 39 .styles(["resources/css/common.css", "resources/css/clouds.css", "resources/css/colors.css"], "resources/css/colors.temp.css") 40 .styles(["resources/css/common.css", "resources/css/fab.css"], "resources/css/fab.temp.css") 41 .styles(["resources/css/common.css", "resources/css/minimal.css"], "resources/css/minimal.temp.css") 42 .styles(["resources/css/common.css", "resources/css/webtrees.css"], "resources/css/webtrees.temp.css") 43 .styles(["resources/css/common.css", "resources/css/xenea.css"], "resources/css/xenea.temp.css") 44 .styles([ 45 "node_modules/bootstrap/dist/css/bootstrap.min.css", 46 "node_modules/datatables.net-bs4/css/dataTables.bootstrap4.css", 47 "node_modules/@fortawesome/fontawesome-free/css/regular.css", 48 "node_modules/@fortawesome/fontawesome-free/css/solid.css", 49 "node_modules/@fortawesome/fontawesome-free/css/fontawesome.css", 50 "node_modules/font-awesome-rtl/font-awesome-rtl.css", 51 "node_modules/select2/dist/css/select2.min.css", 52 "node_modules/typeahead.js-bootstrap4-css/typeaheadjs.css", 53 "node_modules/leaflet/dist/leaflet.css", 54 "node_modules/beautifymarker/leaflet-beautify-marker-icon.css", 55 "node_modules/leaflet-geosearch/dist/style.css", 56 "node_modules/leaflet.markercluster/dist/MarkerCluster.Default.css", 57 "node_modules/leaflet.markercluster/dist/MarkerCluster.css", 58 ], "public/css/vendor.temp.css") 59 .postCss("resources/css/administration.css", "public/css/administration.min.css", postCssPlugins) 60 .postCss("resources/css/clouds.temp.css", "public/css/clouds.min.css", postCssPlugins) 61 .postCss("resources/css/colors.temp.css", "public/css/colors.min.css", postCssPlugins) 62 .postCss("resources/css/colors/aquamarine.css", "public/css/colors/", postCssPlugins) 63 .postCss("resources/css/colors/ash.css", "public/css/colors/ash.min.css", postCssPlugins) 64 .postCss("resources/css/colors/belgianchocolate.css", "public/css/colors/belgianchocolate.min.css", postCssPlugins) 65 .postCss("resources/css/colors/bluelagoon.css", "public/css/colors/bluelagoon.min.css", postCssPlugins) 66 .postCss("resources/css/colors/bluemarine.css", "public/css/colors/bluemarine.min.css", postCssPlugins) 67 .postCss("resources/css/colors/coffeeandcream.css", "public/css/colors/coffeeandcream.min.css", postCssPlugins) 68 .postCss("resources/css/colors/coldday.css", "public/css/colors/coldday.min.css", postCssPlugins) 69 .postCss("resources/css/colors/greenbeam.css", "public/css/colors/greenbeam.min.css", postCssPlugins) 70 .postCss("resources/css/colors/mediterranio.css", "public/css/colors/mediterranio.min.css", postCssPlugins) 71 .postCss("resources/css/colors/mercury.css", "public/css/colors/mercury.min.css", postCssPlugins) 72 .postCss("resources/css/colors/nocturnal.css", "public/css/colors/nocturnal.min.css", postCssPlugins) 73 .postCss("resources/css/colors/olivia.css", "public/css/colors/olivia.min.css", postCssPlugins) 74 .postCss("resources/css/colors/pinkplastic.css", "public/css/colors/pinkplastic.min.css", postCssPlugins) 75 .postCss("resources/css/colors/sage.css", "public/css/colors/sage.min.css", postCssPlugins) 76 .postCss("resources/css/colors/shinytomato.css", "public/css/colors/shinytomato.min.css", postCssPlugins) 77 .postCss("resources/css/colors/tealtop.css", "public/css/colors/tealtop.min.css", postCssPlugins) 78 .postCss("resources/css/fab.temp.css", "public/css/fab.min.css", postCssPlugins) 79 .postCss("resources/css/minimal.temp.css", "public/css/minimal.min.css", postCssPlugins) 80 .postCss("resources/css/webtrees.temp.css", "public/css/webtrees.min.css", postCssPlugins) 81 .postCss("resources/css/xenea.temp.css", "public/css/xenea.min.css", postCssPlugins) 82 .postCss("public/css/vendor.temp.css", "public/css/vendor.min.css", postCssPlugins) 83; 84