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