xref: /webtrees/webpack.mix.js (revision b95649eb604c07d7da487266940a09329a0824f5)
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
11*b95649ebSGreg Roachconst postcss_rtl = require("@mjhenkes/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
2327c4cda0SGreg Roachmix
2427c4cda0SGreg Roach    .autoload({
25ad727080SGreg Roach        jquery: ["$", "jQuery"],
2627c4cda0SGreg Roach    })
27497e2204SGreg Roach    .setPublicPath('./public')
28*b95649ebSGreg Roach    .sourceMaps(false)
29ad727080SGreg Roach    .js("resources/js/vendor.js", "public/js/vendor.min.js")
3066ce3d23SRico Sonntag    .babel(["resources/js/webtrees.js", "resources/js/statistics.js", "resources/js/treeview.js"], "public/js/webtrees.min.js")
31e837ff07SGreg Roach    .copy("node_modules/leaflet/dist/images/*", "public/css/images/")
32caa53803SDavid Drury    .copy("node_modules/leaflet-control-geocoder/dist/images/*", "public/css/images/")
33e837ff07SGreg Roach    .copy("node_modules/dejavu-fonts-ttf/ttf/DejaVuSans.ttf", "resources/fonts/")
34497e2204SGreg Roach    .options({
35497e2204SGreg Roach            processCssUrls: false,
36497e2204SGreg Roach            postCss: [
37497e2204SGreg Roach                postcss_import,
3890bebbc4SGreg Roach                postcss_rtl,
39497e2204SGreg Roach                postcss_autoprefixer,
40497e2204SGreg Roach                postcss_image_inliner,
41497e2204SGreg Roach                postcss_custom_properties,
42497e2204SGreg Roach            ]
43497e2204SGreg Roach    })
44497e2204SGreg Roach    .postCss("resources/css/administration.css", "public/css/administration.min.css")
45497e2204SGreg Roach    .postCss("resources/css/clouds.css", "public/css/clouds.min.css")
46497e2204SGreg Roach    .postCss("resources/css/colors.css", "public/css/colors.min.css")
47497e2204SGreg Roach    .postCss("resources/css/colors/aquamarine.css", "public/css/colors/aquamarine.min.css")
48497e2204SGreg Roach    .postCss("resources/css/colors/ash.css", "public/css/colors/ash.min.css")
49497e2204SGreg Roach    .postCss("resources/css/colors/belgianchocolate.css", "public/css/colors/belgianchocolate.min.css")
50497e2204SGreg Roach    .postCss("resources/css/colors/bluelagoon.css", "public/css/colors/bluelagoon.min.css")
51497e2204SGreg Roach    .postCss("resources/css/colors/bluemarine.css", "public/css/colors/bluemarine.min.css")
52497e2204SGreg Roach    .postCss("resources/css/colors/coffeeandcream.css", "public/css/colors/coffeeandcream.min.css")
53497e2204SGreg Roach    .postCss("resources/css/colors/coldday.css", "public/css/colors/coldday.min.css")
54497e2204SGreg Roach    .postCss("resources/css/colors/greenbeam.css", "public/css/colors/greenbeam.min.css")
55497e2204SGreg Roach    .postCss("resources/css/colors/mediterranio.css", "public/css/colors/mediterranio.min.css")
56497e2204SGreg Roach    .postCss("resources/css/colors/mercury.css", "public/css/colors/mercury.min.css")
57497e2204SGreg Roach    .postCss("resources/css/colors/nocturnal.css", "public/css/colors/nocturnal.min.css")
58497e2204SGreg Roach    .postCss("resources/css/colors/olivia.css", "public/css/colors/olivia.min.css")
59497e2204SGreg Roach    .postCss("resources/css/colors/pinkplastic.css", "public/css/colors/pinkplastic.min.css")
60497e2204SGreg Roach    .postCss("resources/css/colors/sage.css", "public/css/colors/sage.min.css")
61497e2204SGreg Roach    .postCss("resources/css/colors/shinytomato.css", "public/css/colors/shinytomato.min.css")
62497e2204SGreg Roach    .postCss("resources/css/colors/tealtop.css", "public/css/colors/tealtop.min.css")
63497e2204SGreg Roach    .postCss("resources/css/fab.css", "public/css/fab.min.css")
64497e2204SGreg Roach    .postCss("resources/css/minimal.css", "public/css/minimal.min.css")
65497e2204SGreg Roach    .postCss("resources/css/webtrees.css", "public/css/webtrees.min.css")
66497e2204SGreg Roach    .postCss("resources/css/xenea.css", "public/css/xenea.min.css")
679eb34575SGreg Roach    .postCss("resources/css/vendor.css", "public/css/vendor.min.css");
68