xref: /webtrees/webpack.mix.js (revision 2ebb07b4bd8cf7010946ea4d75bb6160666157f6)
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",
298db1f8e0SGreg Roach    "node_modules/select2/dist/css/select2.min.css",
308db1f8e0SGreg Roach    "node_modules/typeahead.js-bootstrap4-css/typeaheadjs.css",
318db1f8e0SGreg Roach    "node_modules/leaflet/dist/leaflet.css",
328db1f8e0SGreg Roach    "node_modules/beautifymarker/leaflet-beautify-marker-icon.css",
338db1f8e0SGreg Roach    "node_modules/leaflet-geosearch/dist/style.css",
348db1f8e0SGreg Roach    "node_modules/leaflet.markercluster/dist/MarkerCluster.Default.css",
358db1f8e0SGreg Roach    "node_modules/leaflet.markercluster/dist/MarkerCluster.css",
368db1f8e0SGreg Roach], "public/css/vendor.css");
378db1f8e0SGreg Roach
3827c4cda0SGreg Roachmix
3927c4cda0SGreg Roach    .autoload({
40ad727080SGreg Roach        jquery: ["$", "jQuery"],
4127c4cda0SGreg Roach    })
42497e2204SGreg Roach    .setPublicPath('./public')
43e837ff07SGreg Roach    .sourceMaps()
44ad727080SGreg Roach    .js("resources/js/vendor.js", "public/js/vendor.min.js")
45*2ebb07b4SGreg Roach    .babel(["resources/js/webtrees.js", "resources/js/treeview.js"], "public/js/webtrees.min.js")
46e837ff07SGreg Roach    .copy("node_modules/leaflet/dist/images/*", "public/css/images/")
47e837ff07SGreg Roach    .copy("node_modules/dejavu-fonts-ttf/ttf/DejaVuSans.ttf", "resources/fonts/")
48497e2204SGreg Roach    .copy("node_modules/@fortawesome/fontawesome-free/webfonts/fa-regular-*", "public/webfonts/")
49497e2204SGreg Roach    .copy("node_modules/@fortawesome/fontawesome-free/webfonts/fa-solid-*", "public/webfonts/")
50497e2204SGreg Roach    .options({
51497e2204SGreg Roach            processCssUrls: false,
52497e2204SGreg Roach            postCss: [
53497e2204SGreg Roach                postcss_import,
54497e2204SGreg Roach                postcss_autoprefixer,
55497e2204SGreg Roach                postcss_image_inliner,
56497e2204SGreg Roach                postcss_rtl,
57497e2204SGreg Roach                postcss_custom_properties,
58497e2204SGreg Roach            ]
59497e2204SGreg Roach    })
60497e2204SGreg Roach    .postCss("resources/css/administration.css", "public/css/administration.min.css")
61497e2204SGreg Roach    .postCss("resources/css/clouds.css", "public/css/clouds.min.css")
62497e2204SGreg Roach    .postCss("resources/css/colors.css", "public/css/colors.min.css")
63497e2204SGreg Roach    .postCss("resources/css/colors/aquamarine.css", "public/css/colors/aquamarine.min.css")
64497e2204SGreg Roach    .postCss("resources/css/colors/ash.css", "public/css/colors/ash.min.css")
65497e2204SGreg Roach    .postCss("resources/css/colors/belgianchocolate.css", "public/css/colors/belgianchocolate.min.css")
66497e2204SGreg Roach    .postCss("resources/css/colors/bluelagoon.css", "public/css/colors/bluelagoon.min.css")
67497e2204SGreg Roach    .postCss("resources/css/colors/bluemarine.css", "public/css/colors/bluemarine.min.css")
68497e2204SGreg Roach    .postCss("resources/css/colors/coffeeandcream.css", "public/css/colors/coffeeandcream.min.css")
69497e2204SGreg Roach    .postCss("resources/css/colors/coldday.css", "public/css/colors/coldday.min.css")
70497e2204SGreg Roach    .postCss("resources/css/colors/greenbeam.css", "public/css/colors/greenbeam.min.css")
71497e2204SGreg Roach    .postCss("resources/css/colors/mediterranio.css", "public/css/colors/mediterranio.min.css")
72497e2204SGreg Roach    .postCss("resources/css/colors/mercury.css", "public/css/colors/mercury.min.css")
73497e2204SGreg Roach    .postCss("resources/css/colors/nocturnal.css", "public/css/colors/nocturnal.min.css")
74497e2204SGreg Roach    .postCss("resources/css/colors/olivia.css", "public/css/colors/olivia.min.css")
75497e2204SGreg Roach    .postCss("resources/css/colors/pinkplastic.css", "public/css/colors/pinkplastic.min.css")
76497e2204SGreg Roach    .postCss("resources/css/colors/sage.css", "public/css/colors/sage.min.css")
77497e2204SGreg Roach    .postCss("resources/css/colors/shinytomato.css", "public/css/colors/shinytomato.min.css")
78497e2204SGreg Roach    .postCss("resources/css/colors/tealtop.css", "public/css/colors/tealtop.min.css")
79497e2204SGreg Roach    .postCss("resources/css/fab.css", "public/css/fab.min.css")
80497e2204SGreg Roach    .postCss("resources/css/minimal.css", "public/css/minimal.min.css")
81497e2204SGreg Roach    .postCss("resources/css/webtrees.css", "public/css/webtrees.min.css")
82497e2204SGreg Roach    .postCss("resources/css/xenea.css", "public/css/xenea.min.css")
83497e2204SGreg Roach    .postCss("public/css/vendor.css", "public/css/vendor.min.css");
84