1
|
|
|
let mix = require('laravel-mix'); |
2
|
|
|
|
3
|
|
|
let paths = { |
4
|
|
|
'bowerPath': './bower_components/', |
5
|
|
|
'webDev': { |
6
|
|
|
'css': './resources/css/', |
7
|
|
|
'js': './resources/js/', |
8
|
|
|
}, |
9
|
|
|
'webProd': { |
10
|
|
|
'public': './public/', |
11
|
|
|
'css': './public/css/', |
12
|
|
|
'js': './public/js/', |
13
|
|
|
'fonts': './public/fonts/', |
14
|
|
|
'img': './public/img/' |
15
|
|
|
} |
16
|
|
|
}; |
17
|
|
|
|
18
|
|
|
mix.setPublicPath('public').disableNotifications(); |
19
|
|
|
|
20
|
|
|
mix.combine([ |
21
|
|
|
paths.bowerPath + 'bootstrap/dist/css/bootstrap.min.css', |
22
|
|
|
paths.bowerPath + 'font-awesome/css/font-awesome.min.css', |
23
|
|
|
paths.bowerPath + 'Ionicons/css/ionicons.min.css', |
24
|
|
|
paths.bowerPath + 'select2/dist/css/select2.min.css', |
25
|
|
|
paths.bowerPath + 'morris.js/morris.css', |
26
|
|
|
paths.bowerPath + 'jvectormap/jquery-jvectormap.css', |
27
|
|
|
paths.bowerPath + 'bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css', |
28
|
|
|
paths.bowerPath + 'bootstrap-daterangepicker/daterangepicker.css', |
29
|
|
|
paths.bowerPath + 'bootstrap-colorpicker/dist/css/bootstrap-colorpicker.css', |
30
|
|
|
paths.bowerPath + 'PACE/themes/white/pace-theme-flash.css', |
31
|
|
|
paths.bowerPath + 'bootstrap-treeview/dist/bootstrap-treeview.min.css', |
32
|
|
|
paths.bowerPath + 'select2-to-tree/src/select2totree.css', |
33
|
|
|
paths.bowerPath + 'toastr/toastr.min.css', |
34
|
|
|
paths.bowerPath + 'x-editable/dist/bootstrap3-editable/css/bootstrap-editable.css', |
35
|
|
|
paths.bowerPath + 'datetimepicker/jquery.datetimepicker.css', |
36
|
|
|
paths.bowerPath + 'chart.js/dist/Chart.min.css', |
37
|
|
|
paths.bowerPath + 'bootstrap-sweetalert/dist/sweetalert.css', |
38
|
|
|
paths.bowerPath + 'cropper/dist/cropper.css', |
39
|
|
|
|
40
|
|
|
paths.webDev.css + 'skins/_all-skins.min.css', |
41
|
|
|
paths.webDev.css + 'AdminLTE.min.css', |
42
|
|
|
//paths.webDev.css + 'dashboard.css', |
43
|
|
|
], paths.webProd.css + 'main.css', false); |
44
|
|
|
|
45
|
|
|
mix.combine([ |
46
|
|
|
paths.bowerPath + 'jquery/dist/jquery.js', |
47
|
|
|
paths.bowerPath + 'jquery-ui/jquery-ui.min.js', |
48
|
|
|
paths.bowerPath + 'bootstrap/dist/js/bootstrap.min.js', |
49
|
|
|
paths.bowerPath + 'raphael/raphael.min.js', |
50
|
|
|
paths.bowerPath + 'morris.js/morris.min.js', |
51
|
|
|
paths.bowerPath + 'jquery-sparkline/dist/jquery.sparkline.min.js', |
52
|
|
|
paths.bowerPath + 'jquery-knob/dist/jquery.knob.min.js', |
53
|
|
|
paths.bowerPath + 'moment/min/moment.min.js', |
54
|
|
|
paths.bowerPath + 'bootstrap-daterangepicker/daterangepicker.js', |
55
|
|
|
paths.bowerPath + 'bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js', |
56
|
|
|
paths.bowerPath + 'bootstrap-colorpicker/dist/js/bootstrap-colorpicker.js', |
57
|
|
|
paths.bowerPath + 'jquery-slimscroll/jquery.slimscroll.min.js', |
58
|
|
|
paths.bowerPath + 'fastclick/lib/fastclick.js', |
59
|
|
|
paths.bowerPath + 'select2/dist/js/select2.full.min.js', |
60
|
|
|
paths.bowerPath + 'select2/dist/js/i18n/ru.js', |
61
|
|
|
paths.bowerPath + 'jquery-sortable/source/js/jquery-sortable-min.js', |
62
|
|
|
paths.bowerPath + 'PACE/pace.min.js', |
63
|
|
|
paths.bowerPath + 'bootstrap-treeview/dist/bootstrap-treeview.min.js', |
64
|
|
|
paths.bowerPath + 'select2-to-tree/src/select2totree.js', |
65
|
|
|
paths.bowerPath + 'toastr/toastr.min.js', |
66
|
|
|
paths.bowerPath + 'x-editable/dist/bootstrap3-editable/js/bootstrap-editable.js', |
67
|
|
|
paths.bowerPath + 'datetimepicker/build/jquery.datetimepicker.full.js', |
68
|
|
|
paths.bowerPath + 'chart.js/dist/Chart.min.js', |
69
|
|
|
paths.bowerPath + 'bootstrap-sweetalert/dist/sweetalert.min.js', |
70
|
|
|
paths.bowerPath + 'cropperjs/dist/cropper.js', |
71
|
|
|
paths.bowerPath + 'jquery-cropper/dist/jquery-cropper.js', |
72
|
|
|
paths.bowerPath + 'cropper/dist/cropper.js', |
73
|
|
|
|
74
|
|
|
paths.webDev.js + 'adminlte.min.js', |
75
|
|
|
], paths.webProd.js + 'main.js', false); |
76
|
|
|
|
77
|
|
|
mix.copy(paths.webDev.css + 'dashboard.css', paths.webProd.css + 'dashboard.css'); |
78
|
|
|
mix.copy(paths.webDev.js + 'dashboard.js', paths.webProd.js + 'dashboard.js'); |
79
|
|
|
mix.copyDirectory(paths.bowerPath + 'font-awesome/fonts', paths.webProd.fonts); |
80
|
|
|
mix.copyDirectory(paths.bowerPath + 'Ionicons/fonts', paths.webProd.fonts); |
81
|
|
|
mix.copyDirectory(paths.bowerPath + 'bootstrap/fonts', paths.webProd.fonts); |
82
|
|
|
mix.copyDirectory(paths.bowerPath + 'ckeditor', paths.webProd.public + 'ckeditor'); |
83
|
|
|
mix.copyDirectory(paths.bowerPath + 'x-editable/dist/bootstrap3-editable/img', paths.webProd.img); |
84
|
|
|
|
85
|
|
|
if (mix.inProduction()) { |
86
|
|
|
/* Minify assets */ |
87
|
|
|
mix.minify(paths.webProd.css + 'main.css').version(); |
88
|
|
|
mix.minify(paths.webProd.js + 'main.js').version(); |
89
|
|
|
// mix.minify(paths.webProd.css + 'dashboard.css').version(); |
90
|
|
|
// mix.minify(paths.webProd.js + 'dashboard.js').version(); |
91
|
|
|
} |
92
|
|
|
|
93
|
|
|
|