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