forked from fisharebest/webtrees
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.mix.js
66 lines (60 loc) · 3.23 KB
/
webpack.mix.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
// https://laravel-mix.com
const mix = require('laravel-mix');
// https://github.com/postcss/postcss-import
const postcssImport = require('postcss-import')();
// https://github.com/postcss/autoprefixer
const postcssAutoprefixer = require('autoprefixer')();
// https://github.com/elchininet/postcss-rtlcss
const postcssRTLCSS = require('postcss-rtlcss')({safeBothPrefix: true});
// https://github.com/bezoerb/postcss-image-inliner
const postcssImageInliner = require('postcss-image-inliner')({
assetPaths: ['resources/css'],
maxFileSize: 0
});
// https://github.com/postcss/postcss-custom-properties
// Enable CSS variables in IE
const postcssCustomProperties = require('postcss-custom-properties')();
mix
.autoload({
jquery: ['$', 'jQuery']
})
.setPublicPath('./public')
.sourceMaps(false)
.js('resources/js/vendor.js', 'public/js/vendor.min.js')
.babel(['resources/js/webtrees.js', 'resources/js/statistics.js', 'resources/js/treeview.js'], 'public/js/webtrees.min.js')
.copy('node_modules/leaflet/dist/images/*', 'public/css/images/')
.copy('node_modules/dejavu-fonts-ttf/ttf/DejaVuSans.ttf', 'resources/fonts/')
.options({
processCssUrls: false,
postCss: [
postcssImport,
postcssRTLCSS,
postcssAutoprefixer,
postcssImageInliner,
postcssCustomProperties
]
})
.postCss('resources/css/administration.css', 'public/css/administration.min.css')
.postCss('resources/css/clouds.css', 'public/css/clouds.min.css')
.postCss('resources/css/colors.css', 'public/css/colors.min.css')
.postCss('resources/css/colors/aquamarine.css', 'public/css/colors/aquamarine.min.css')
.postCss('resources/css/colors/ash.css', 'public/css/colors/ash.min.css')
.postCss('resources/css/colors/belgianchocolate.css', 'public/css/colors/belgianchocolate.min.css')
.postCss('resources/css/colors/bluelagoon.css', 'public/css/colors/bluelagoon.min.css')
.postCss('resources/css/colors/bluemarine.css', 'public/css/colors/bluemarine.min.css')
.postCss('resources/css/colors/coffeeandcream.css', 'public/css/colors/coffeeandcream.min.css')
.postCss('resources/css/colors/coldday.css', 'public/css/colors/coldday.min.css')
.postCss('resources/css/colors/greenbeam.css', 'public/css/colors/greenbeam.min.css')
.postCss('resources/css/colors/mediterranio.css', 'public/css/colors/mediterranio.min.css')
.postCss('resources/css/colors/mercury.css', 'public/css/colors/mercury.min.css')
.postCss('resources/css/colors/nocturnal.css', 'public/css/colors/nocturnal.min.css')
.postCss('resources/css/colors/olivia.css', 'public/css/colors/olivia.min.css')
.postCss('resources/css/colors/pinkplastic.css', 'public/css/colors/pinkplastic.min.css')
.postCss('resources/css/colors/sage.css', 'public/css/colors/sage.min.css')
.postCss('resources/css/colors/shinytomato.css', 'public/css/colors/shinytomato.min.css')
.postCss('resources/css/colors/tealtop.css', 'public/css/colors/tealtop.min.css')
.postCss('resources/css/fab.css', 'public/css/fab.min.css')
.postCss('resources/css/minimal.css', 'public/css/minimal.min.css')
.postCss('resources/css/webtrees.css', 'public/css/webtrees.min.css')
.postCss('resources/css/xenea.css', 'public/css/xenea.min.css')
.postCss('resources/css/vendor.css', 'public/css/vendor.min.css');