xref: /webtrees/webpack.mix.js (revision 8db1f8e0a67220ec7f60eedc26ceafe8b3f7942d)
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"],
16e837ff07SGreg Roach});
17e837ff07SGreg Roach
1897c22350SGreg Roach// https://github.com/postcss/postcss-custom-properties
1997c22350SGreg Roach// Enable CSS variables in IE
2097c22350SGreg Roachconst postcss_custom_properties = require("postcss-custom-properties")();
2197c22350SGreg Roach
22e837ff07SGreg Roach// https://github.com/postcss/postcss
23e837ff07SGreg Roachconst postCssPlugins = [
24b9a12084SGreg Roach    postcss_import,
25b9a12084SGreg Roach    postcss_autoprefixer,
26e837ff07SGreg Roach    postcss_image_inliner,
27e837ff07SGreg Roach    postcss_rtl,
2897c22350SGreg Roach    postcss_custom_properties,
29e837ff07SGreg Roach];
3027c4cda0SGreg Roach
31*8db1f8e0SGreg Roachmix.styles([
32*8db1f8e0SGreg Roach    "node_modules/bootstrap/dist/css/bootstrap.min.css",
33*8db1f8e0SGreg Roach    "node_modules/datatables.net-bs4/css/dataTables.bootstrap4.css",
34*8db1f8e0SGreg Roach    "node_modules/@fortawesome/fontawesome-free/css/regular.css",
35*8db1f8e0SGreg Roach    "node_modules/@fortawesome/fontawesome-free/css/solid.css",
36*8db1f8e0SGreg Roach    "node_modules/@fortawesome/fontawesome-free/css/fontawesome.css",
37*8db1f8e0SGreg Roach    "node_modules/font-awesome-rtl/font-awesome-rtl.css",
38*8db1f8e0SGreg Roach    "node_modules/select2/dist/css/select2.min.css",
39*8db1f8e0SGreg Roach    "node_modules/typeahead.js-bootstrap4-css/typeaheadjs.css",
40*8db1f8e0SGreg Roach    "node_modules/leaflet/dist/leaflet.css",
41*8db1f8e0SGreg Roach    "node_modules/beautifymarker/leaflet-beautify-marker-icon.css",
42*8db1f8e0SGreg Roach    "node_modules/leaflet-geosearch/dist/style.css",
43*8db1f8e0SGreg Roach    "node_modules/leaflet.markercluster/dist/MarkerCluster.Default.css",
44*8db1f8e0SGreg Roach    "node_modules/leaflet.markercluster/dist/MarkerCluster.css",
45*8db1f8e0SGreg Roach], "public/css/vendor.css");
46*8db1f8e0SGreg Roach
4727c4cda0SGreg Roachmix
4827c4cda0SGreg Roach    .autoload({
49ad727080SGreg Roach        jquery: ["$", "jQuery"],
5027c4cda0SGreg Roach    })
51e837ff07SGreg Roach    .sourceMaps()
52ad727080SGreg Roach    .js("resources/js/vendor.js", "public/js/vendor.min.js")
53ad727080SGreg Roach    .babel("resources/js/webtrees.js", "public/js/webtrees.min.js")
54e837ff07SGreg Roach    .copy("node_modules/@fortawesome/fontawesome-free/webfonts/*", "public/webfonts/")
55e837ff07SGreg Roach    .copy("node_modules/leaflet/dist/images/*", "public/css/images/")
56e837ff07SGreg Roach    .copy("node_modules/dejavu-fonts-ttf/ttf/DejaVuSans.ttf", "resources/fonts/")
57e837ff07SGreg Roach    .postCss("resources/css/administration.css", "public/css/administration.min.css", postCssPlugins)
58f699d6fcSGreg Roach    .postCss("resources/css/clouds.css", "public/css/clouds.min.css", postCssPlugins)
59f699d6fcSGreg Roach    .postCss("resources/css/colors.css", "public/css/colors.min.css", postCssPlugins)
60f699d6fcSGreg Roach    .postCss("resources/css/colors/aquamarine.css", "public/css/colors/aquamarine.min.css", postCssPlugins)
6197c22350SGreg Roach    .postCss("resources/css/colors/ash.css", "public/css/colors/ash.min.css", postCssPlugins)
6297c22350SGreg Roach    .postCss("resources/css/colors/belgianchocolate.css", "public/css/colors/belgianchocolate.min.css", postCssPlugins)
6397c22350SGreg Roach    .postCss("resources/css/colors/bluelagoon.css", "public/css/colors/bluelagoon.min.css", postCssPlugins)
6497c22350SGreg Roach    .postCss("resources/css/colors/bluemarine.css", "public/css/colors/bluemarine.min.css", postCssPlugins)
6597c22350SGreg Roach    .postCss("resources/css/colors/coffeeandcream.css", "public/css/colors/coffeeandcream.min.css", postCssPlugins)
6697c22350SGreg Roach    .postCss("resources/css/colors/coldday.css", "public/css/colors/coldday.min.css", postCssPlugins)
6797c22350SGreg Roach    .postCss("resources/css/colors/greenbeam.css", "public/css/colors/greenbeam.min.css", postCssPlugins)
6897c22350SGreg Roach    .postCss("resources/css/colors/mediterranio.css", "public/css/colors/mediterranio.min.css", postCssPlugins)
6997c22350SGreg Roach    .postCss("resources/css/colors/mercury.css", "public/css/colors/mercury.min.css", postCssPlugins)
7097c22350SGreg Roach    .postCss("resources/css/colors/nocturnal.css", "public/css/colors/nocturnal.min.css", postCssPlugins)
7197c22350SGreg Roach    .postCss("resources/css/colors/olivia.css", "public/css/colors/olivia.min.css", postCssPlugins)
7297c22350SGreg Roach    .postCss("resources/css/colors/pinkplastic.css", "public/css/colors/pinkplastic.min.css", postCssPlugins)
7397c22350SGreg Roach    .postCss("resources/css/colors/sage.css", "public/css/colors/sage.min.css", postCssPlugins)
7497c22350SGreg Roach    .postCss("resources/css/colors/shinytomato.css", "public/css/colors/shinytomato.min.css", postCssPlugins)
7597c22350SGreg Roach    .postCss("resources/css/colors/tealtop.css", "public/css/colors/tealtop.min.css", postCssPlugins)
76f699d6fcSGreg Roach    .postCss("resources/css/fab.css", "public/css/fab.min.css", postCssPlugins)
77f699d6fcSGreg Roach    .postCss("resources/css/minimal.css", "public/css/minimal.min.css", postCssPlugins)
78f699d6fcSGreg Roach    .postCss("resources/css/webtrees.css", "public/css/webtrees.min.css", postCssPlugins)
79f699d6fcSGreg Roach    .postCss("resources/css/xenea.css", "public/css/xenea.min.css", postCssPlugins)
80f699d6fcSGreg Roach    .postCss("public/css/vendor.css", "public/css/vendor.min.css", postCssPlugins);
81