-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
winter.mix.js
86 lines (78 loc) · 2.65 KB
/
winter.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/* eslint-disable */
const mix = require('laravel-mix');
require('laravel-mix-polyfill');
/* eslint-enable */
mix.setPublicPath(__dirname);
mix
.options({
terser: {
extractComments: false,
},
runtimeChunkPath: './assets/js/build',
})
// Extract imported libraries
.extract({
libraries: ['js-cookie'],
to: './assets/js/snowboard/build/snowboard.vendor.js',
})
// Compile Storm UI and framework assets
.less('./assets/less/styles.less', './assets/css/styles.css')
.less('./assets/ui/storm.less', './assets/ui/storm.css')
.less('./assets/less/framework.extras.less', './assets/css/framework.extras.css', {
lessOptions: {
strictMath: true,
},
})
.less('./assets/less/snowboard.extras.less', './assets/css/snowboard.extras.css', {
lessOptions: {
strictMath: true,
},
})
.less('./assets/ui/less/select.less', './assets/ui/vendor/select2/css/select2.css')
// Compile Font Awesome icons and fonts
.less('./assets/ui/icons.less', './assets/ui/icons.css')
.copy('./../../node_modules/@fortawesome/fontawesome-free/webfonts/*', './assets/ui/font')
// Compile Snowboard for the Backend / System
.js(
[
'./assets/js/snowboard/snowboard.base.js',
'./assets/js/snowboard/snowboard.request.js',
'./assets/js/snowboard/snowboard.backend.extras.js',
],
'./assets/js/build/system.js',
)
.js(
[
'./assets/js/snowboard/snowboard.base.debug.js',
'./assets/js/snowboard/snowboard.request.js',
'./assets/js/snowboard/snowboard.backend.extras.js',
],
'./assets/js/build/system.debug.js',
)
// Compile Snowboard framework separately for the CMS module
.js(
'./assets/js/snowboard/snowboard.base.js',
'./assets/js/snowboard/build/snowboard.base.js',
)
.js(
'./assets/js/snowboard/snowboard.base.debug.js',
'./assets/js/snowboard/build/snowboard.base.debug.js',
)
.js(
'./assets/js/snowboard/snowboard.request.js',
'./assets/js/snowboard/build/snowboard.request.js',
)
.js(
'./assets/js/snowboard/snowboard.data-attr.js',
'./assets/js/snowboard/build/snowboard.data-attr.js',
)
.js(
'./assets/js/snowboard/snowboard.extras.js',
'./assets/js/snowboard/build/snowboard.extras.js',
)
// Polyfill for all targeted browsers
.polyfill({
enabled: mix.inProduction(),
useBuiltIns: 'usage',
targets: '> 0.5%, last 2 versions, not dead, Firefox ESR, not ie > 0',
});