xref: /webtrees/webpack.mix.js (revision b60877d9de903a8f4c698c6a4ab3b88a86ebf4b5)
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",
268db1f8e0SGreg Roach    "node_modules/@fortawesome/fontawesome-free/css/regular.css",
278db1f8e0SGreg Roach    "node_modules/@fortawesome/fontawesome-free/css/solid.css",
288db1f8e0SGreg Roach    "node_modules/@fortawesome/fontawesome-free/css/fontawesome.css",
29*b60877d9SGreg Roach    "resources/css/begin-ignore-rtl.css",
308db1f8e0SGreg Roach    "node_modules/select2/dist/css/select2.min.css",
31*b60877d9SGreg Roach    "resources/css/end-ignore-rtl.css",
328db1f8e0SGreg Roach    "node_modules/typeahead.js-bootstrap4-css/typeaheadjs.css",
338db1f8e0SGreg Roach    "node_modules/leaflet/dist/leaflet.css",
348db1f8e0SGreg Roach    "node_modules/beautifymarker/leaflet-beautify-marker-icon.css",
358db1f8e0SGreg Roach    "node_modules/leaflet-geosearch/dist/style.css",
368db1f8e0SGreg Roach    "node_modules/leaflet.markercluster/dist/MarkerCluster.Default.css",
378db1f8e0SGreg Roach    "node_modules/leaflet.markercluster/dist/MarkerCluster.css",
388db1f8e0SGreg Roach], "public/css/vendor.css");
398db1f8e0SGreg Roach
4027c4cda0SGreg Roachmix
4127c4cda0SGreg Roach    .autoload({
42ad727080SGreg Roach        jquery: ["$", "jQuery"],
4327c4cda0SGreg Roach    })
44497e2204SGreg Roach    .setPublicPath('./public')
45e837ff07SGreg Roach    .sourceMaps()
46ad727080SGreg Roach    .js("resources/js/vendor.js", "public/js/vendor.min.js")
472ebb07b4SGreg Roach    .babel(["resources/js/webtrees.js", "resources/js/treeview.js"], "public/js/webtrees.min.js")
48e837ff07SGreg Roach    .copy("node_modules/leaflet/dist/images/*", "public/css/images/")
49e837ff07SGreg Roach    .copy("node_modules/dejavu-fonts-ttf/ttf/DejaVuSans.ttf", "resources/fonts/")
50497e2204SGreg Roach    .copy("node_modules/@fortawesome/fontawesome-free/webfonts/fa-regular-*", "public/webfonts/")
51497e2204SGreg Roach    .copy("node_modules/@fortawesome/fontawesome-free/webfonts/fa-solid-*", "public/webfonts/")
52497e2204SGreg Roach    .options({
53497e2204SGreg Roach            processCssUrls: false,
54497e2204SGreg Roach            postCss: [
55*b60877d9SGreg Roach                postcss_rtl,
56497e2204SGreg Roach                postcss_import,
57497e2204SGreg Roach                postcss_autoprefixer,
58497e2204SGreg Roach                postcss_image_inliner,
59497e2204SGreg Roach                postcss_custom_properties,
60497e2204SGreg Roach            ]
61497e2204SGreg Roach    })
62497e2204SGreg Roach    .postCss("resources/css/administration.css", "public/css/administration.min.css")
63497e2204SGreg Roach    .postCss("resources/css/clouds.css", "public/css/clouds.min.css")
64497e2204SGreg Roach    .postCss("resources/css/colors.css", "public/css/colors.min.css")
65497e2204SGreg Roach    .postCss("resources/css/colors/aquamarine.css", "public/css/colors/aquamarine.min.css")
66497e2204SGreg Roach    .postCss("resources/css/colors/ash.css", "public/css/colors/ash.min.css")
67497e2204SGreg Roach    .postCss("resources/css/colors/belgianchocolate.css", "public/css/colors/belgianchocolate.min.css")
68497e2204SGreg Roach    .postCss("resources/css/colors/bluelagoon.css", "public/css/colors/bluelagoon.min.css")
69497e2204SGreg Roach    .postCss("resources/css/colors/bluemarine.css", "public/css/colors/bluemarine.min.css")
70497e2204SGreg Roach    .postCss("resources/css/colors/coffeeandcream.css", "public/css/colors/coffeeandcream.min.css")
71497e2204SGreg Roach    .postCss("resources/css/colors/coldday.css", "public/css/colors/coldday.min.css")
72497e2204SGreg Roach    .postCss("resources/css/colors/greenbeam.css", "public/css/colors/greenbeam.min.css")
73497e2204SGreg Roach    .postCss("resources/css/colors/mediterranio.css", "public/css/colors/mediterranio.min.css")
74497e2204SGreg Roach    .postCss("resources/css/colors/mercury.css", "public/css/colors/mercury.min.css")
75497e2204SGreg Roach    .postCss("resources/css/colors/nocturnal.css", "public/css/colors/nocturnal.min.css")
76497e2204SGreg Roach    .postCss("resources/css/colors/olivia.css", "public/css/colors/olivia.min.css")
77497e2204SGreg Roach    .postCss("resources/css/colors/pinkplastic.css", "public/css/colors/pinkplastic.min.css")
78497e2204SGreg Roach    .postCss("resources/css/colors/sage.css", "public/css/colors/sage.min.css")
79497e2204SGreg Roach    .postCss("resources/css/colors/shinytomato.css", "public/css/colors/shinytomato.min.css")
80497e2204SGreg Roach    .postCss("resources/css/colors/tealtop.css", "public/css/colors/tealtop.min.css")
81497e2204SGreg Roach    .postCss("resources/css/fab.css", "public/css/fab.min.css")
82497e2204SGreg Roach    .postCss("resources/css/minimal.css", "public/css/minimal.min.css")
83497e2204SGreg Roach    .postCss("resources/css/webtrees.css", "public/css/webtrees.min.css")
84497e2204SGreg Roach    .postCss("resources/css/xenea.css", "public/css/xenea.min.css")
85497e2204SGreg Roach    .postCss("public/css/vendor.css", "public/css/vendor.min.css");
86