xref: /webtrees/webpack.mix.js (revision 90bebbc4281e8765ee9bc2131f23e3e5bd195a75)
1e837ff07SGreg Roach// https://laravel-mix.com
2e837ff07SGreg Roachconst mix = require("laravel-mix");
3e837ff07SGreg Roach
4b9a12084SGreg Roach// https://github.com/postcss/postcss-import
5b9a12084SGreg Roachconst postcss_import = require("postcss-import")();
6b9a12084SGreg Roach
7e837ff07SGreg Roach// https://github.com/postcss/autoprefixer
8b9a12084SGreg Roachconst postcss_autoprefixer = require("autoprefixer")();
9e837ff07SGreg Roach
10e837ff07SGreg Roach// https://github.com/jakob101/postcss-inline-rtl
11e837ff07SGreg Roachconst postcss_rtl = require("postcss-rtl")();
12e837ff07SGreg Roach
13e837ff07SGreg Roach// https://github.com/bezoerb/postcss-image-inliner
14e837ff07SGreg Roachconst postcss_image_inliner = require("postcss-image-inliner")({
15e837ff07SGreg Roach    assetPaths: ["resources/css"],
16497e2204SGreg Roach    maxFileSize: 0,
17e837ff07SGreg Roach});
18e837ff07SGreg Roach
1997c22350SGreg Roach// https://github.com/postcss/postcss-custom-properties
2097c22350SGreg Roach// Enable CSS variables in IE
2197c22350SGreg Roachconst postcss_custom_properties = require("postcss-custom-properties")();
2297c22350SGreg Roach
238db1f8e0SGreg Roachmix.styles([
248db1f8e0SGreg Roach    "node_modules/bootstrap/dist/css/bootstrap.min.css",
258db1f8e0SGreg Roach    "node_modules/datatables.net-bs4/css/dataTables.bootstrap4.css",
26b60877d9SGreg Roach    "resources/css/begin-ignore-rtl.css",
278db1f8e0SGreg Roach    "node_modules/select2/dist/css/select2.min.css",
28b60877d9SGreg Roach    "resources/css/end-ignore-rtl.css",
298db1f8e0SGreg Roach    "node_modules/typeahead.js-bootstrap4-css/typeaheadjs.css",
308db1f8e0SGreg Roach    "node_modules/leaflet/dist/leaflet.css",
318db1f8e0SGreg Roach    "node_modules/beautifymarker/leaflet-beautify-marker-icon.css",
328db1f8e0SGreg Roach    "node_modules/leaflet-geosearch/dist/style.css",
338db1f8e0SGreg Roach    "node_modules/leaflet.markercluster/dist/MarkerCluster.Default.css",
348db1f8e0SGreg Roach    "node_modules/leaflet.markercluster/dist/MarkerCluster.css",
358db1f8e0SGreg Roach], "public/css/vendor.css");
368db1f8e0SGreg Roach
3727c4cda0SGreg Roachmix
3827c4cda0SGreg Roach    .autoload({
39ad727080SGreg Roach        jquery: ["$", "jQuery"],
4027c4cda0SGreg Roach    })
41497e2204SGreg Roach    .setPublicPath('./public')
42e837ff07SGreg Roach    .sourceMaps()
43ad727080SGreg Roach    .js("resources/js/vendor.js", "public/js/vendor.min.js")
4466ce3d23SRico Sonntag    .babel(["resources/js/webtrees.js", "resources/js/statistics.js", "resources/js/treeview.js"], "public/js/webtrees.min.js")
45e837ff07SGreg Roach    .copy("node_modules/leaflet/dist/images/*", "public/css/images/")
46e837ff07SGreg Roach    .copy("node_modules/dejavu-fonts-ttf/ttf/DejaVuSans.ttf", "resources/fonts/")
47497e2204SGreg Roach    .options({
48497e2204SGreg Roach            processCssUrls: false,
49497e2204SGreg Roach            postCss: [
50497e2204SGreg Roach                postcss_import,
51*90bebbc4SGreg Roach                postcss_rtl,
52497e2204SGreg Roach                postcss_autoprefixer,
53497e2204SGreg Roach                postcss_image_inliner,
54497e2204SGreg Roach                postcss_custom_properties,
55497e2204SGreg Roach            ]
56497e2204SGreg Roach    })
57497e2204SGreg Roach    .postCss("resources/css/administration.css", "public/css/administration.min.css")
58497e2204SGreg Roach    .postCss("resources/css/clouds.css", "public/css/clouds.min.css")
59497e2204SGreg Roach    .postCss("resources/css/colors.css", "public/css/colors.min.css")
60497e2204SGreg Roach    .postCss("resources/css/colors/aquamarine.css", "public/css/colors/aquamarine.min.css")
61497e2204SGreg Roach    .postCss("resources/css/colors/ash.css", "public/css/colors/ash.min.css")
62497e2204SGreg Roach    .postCss("resources/css/colors/belgianchocolate.css", "public/css/colors/belgianchocolate.min.css")
63497e2204SGreg Roach    .postCss("resources/css/colors/bluelagoon.css", "public/css/colors/bluelagoon.min.css")
64497e2204SGreg Roach    .postCss("resources/css/colors/bluemarine.css", "public/css/colors/bluemarine.min.css")
65497e2204SGreg Roach    .postCss("resources/css/colors/coffeeandcream.css", "public/css/colors/coffeeandcream.min.css")
66497e2204SGreg Roach    .postCss("resources/css/colors/coldday.css", "public/css/colors/coldday.min.css")
67497e2204SGreg Roach    .postCss("resources/css/colors/greenbeam.css", "public/css/colors/greenbeam.min.css")
68497e2204SGreg Roach    .postCss("resources/css/colors/mediterranio.css", "public/css/colors/mediterranio.min.css")
69497e2204SGreg Roach    .postCss("resources/css/colors/mercury.css", "public/css/colors/mercury.min.css")
70497e2204SGreg Roach    .postCss("resources/css/colors/nocturnal.css", "public/css/colors/nocturnal.min.css")
71497e2204SGreg Roach    .postCss("resources/css/colors/olivia.css", "public/css/colors/olivia.min.css")
72497e2204SGreg Roach    .postCss("resources/css/colors/pinkplastic.css", "public/css/colors/pinkplastic.min.css")
73497e2204SGreg Roach    .postCss("resources/css/colors/sage.css", "public/css/colors/sage.min.css")
74497e2204SGreg Roach    .postCss("resources/css/colors/shinytomato.css", "public/css/colors/shinytomato.min.css")
75497e2204SGreg Roach    .postCss("resources/css/colors/tealtop.css", "public/css/colors/tealtop.min.css")
76497e2204SGreg Roach    .postCss("resources/css/fab.css", "public/css/fab.min.css")
77497e2204SGreg Roach    .postCss("resources/css/minimal.css", "public/css/minimal.min.css")
78497e2204SGreg Roach    .postCss("resources/css/webtrees.css", "public/css/webtrees.min.css")
79497e2204SGreg Roach    .postCss("resources/css/xenea.css", "public/css/xenea.min.css")
80497e2204SGreg Roach    .postCss("public/css/vendor.css", "public/css/vendor.min.css");
81