xref: /webtrees/webpack.mix.js (revision b9a12084f644c832d7cc7a00a6b4d6c1527cdb44)
1e837ff07SGreg Roach// https://laravel-mix.com
2e837ff07SGreg Roachconst mix = require("laravel-mix");
3e837ff07SGreg Roach
4*b9a12084SGreg Roach// https://github.com/postcss/postcss-import
5*b9a12084SGreg Roachconst postcss_import = require("postcss-import")();
6*b9a12084SGreg Roach
7e837ff07SGreg Roach// https://github.com/postcss/autoprefixer
8*b9a12084SGreg 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 = [
24*b9a12084SGreg Roach    postcss_import,
25*b9a12084SGreg Roach    postcss_autoprefixer,
26e837ff07SGreg Roach    postcss_image_inliner,
27e837ff07SGreg Roach    postcss_rtl,
2897c22350SGreg Roach    postcss_custom_properties,
29e837ff07SGreg Roach];
3027c4cda0SGreg Roach
3127c4cda0SGreg Roachmix
3227c4cda0SGreg Roach    .autoload({
33ad727080SGreg Roach        jquery: ["$", "jQuery"],
3427c4cda0SGreg Roach    })
35e837ff07SGreg Roach    .sourceMaps()
36ad727080SGreg Roach    .js("resources/js/vendor.js", "public/js/vendor.min.js")
37ad727080SGreg Roach    .babel("resources/js/webtrees.js", "public/js/webtrees.min.js")
38e837ff07SGreg Roach    .copy("node_modules/@fortawesome/fontawesome-free/webfonts/*", "public/webfonts/")
39e837ff07SGreg Roach    .copy("node_modules/leaflet/dist/images/*", "public/css/images/")
40e837ff07SGreg Roach    .copy("node_modules/dejavu-fonts-ttf/ttf/DejaVuSans.ttf", "resources/fonts/")
41e837ff07SGreg Roach    .postCss("resources/css/administration.css", "public/css/administration.min.css", postCssPlugins)
42f699d6fcSGreg Roach    .postCss("resources/css/clouds.css", "public/css/clouds.min.css", postCssPlugins)
43f699d6fcSGreg Roach    .postCss("resources/css/colors.css", "public/css/colors.min.css", postCssPlugins)
44f699d6fcSGreg Roach    .postCss("resources/css/colors/aquamarine.css", "public/css/colors/aquamarine.min.css", postCssPlugins)
4597c22350SGreg Roach    .postCss("resources/css/colors/ash.css", "public/css/colors/ash.min.css", postCssPlugins)
4697c22350SGreg Roach    .postCss("resources/css/colors/belgianchocolate.css", "public/css/colors/belgianchocolate.min.css", postCssPlugins)
4797c22350SGreg Roach    .postCss("resources/css/colors/bluelagoon.css", "public/css/colors/bluelagoon.min.css", postCssPlugins)
4897c22350SGreg Roach    .postCss("resources/css/colors/bluemarine.css", "public/css/colors/bluemarine.min.css", postCssPlugins)
4997c22350SGreg Roach    .postCss("resources/css/colors/coffeeandcream.css", "public/css/colors/coffeeandcream.min.css", postCssPlugins)
5097c22350SGreg Roach    .postCss("resources/css/colors/coldday.css", "public/css/colors/coldday.min.css", postCssPlugins)
5197c22350SGreg Roach    .postCss("resources/css/colors/greenbeam.css", "public/css/colors/greenbeam.min.css", postCssPlugins)
5297c22350SGreg Roach    .postCss("resources/css/colors/mediterranio.css", "public/css/colors/mediterranio.min.css", postCssPlugins)
5397c22350SGreg Roach    .postCss("resources/css/colors/mercury.css", "public/css/colors/mercury.min.css", postCssPlugins)
5497c22350SGreg Roach    .postCss("resources/css/colors/nocturnal.css", "public/css/colors/nocturnal.min.css", postCssPlugins)
5597c22350SGreg Roach    .postCss("resources/css/colors/olivia.css", "public/css/colors/olivia.min.css", postCssPlugins)
5697c22350SGreg Roach    .postCss("resources/css/colors/pinkplastic.css", "public/css/colors/pinkplastic.min.css", postCssPlugins)
5797c22350SGreg Roach    .postCss("resources/css/colors/sage.css", "public/css/colors/sage.min.css", postCssPlugins)
5897c22350SGreg Roach    .postCss("resources/css/colors/shinytomato.css", "public/css/colors/shinytomato.min.css", postCssPlugins)
5997c22350SGreg Roach    .postCss("resources/css/colors/tealtop.css", "public/css/colors/tealtop.min.css", postCssPlugins)
60f699d6fcSGreg Roach    .postCss("resources/css/fab.css", "public/css/fab.min.css", postCssPlugins)
61f699d6fcSGreg Roach    .postCss("resources/css/minimal.css", "public/css/minimal.min.css", postCssPlugins)
62f699d6fcSGreg Roach    .postCss("resources/css/webtrees.css", "public/css/webtrees.min.css", postCssPlugins)
63f699d6fcSGreg Roach    .postCss("resources/css/xenea.css", "public/css/xenea.min.css", postCssPlugins)
64f699d6fcSGreg Roach    .postCss("public/css/vendor.css", "public/css/vendor.min.css", postCssPlugins);
65