-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.mix.js
107 lines (88 loc) · 4.12 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
const mix = require('laravel-mix');
//source path configuration
let vendors = 'node_modules/';
let resourcesAssets = 'resources/';
let srcCss = resourcesAssets + 'css/';
let srcJs = resourcesAssets + 'js/';
let srcImg = resourcesAssets + 'img/';
//destination path configuration
let dest = 'public/';
let destFonts = dest + 'fonts/';
let destCss = dest + 'css/';
let destJs = dest + 'js/';
let destImg = dest + 'img/';
let destVendors = dest + 'vendors/';
var paths = {
'bootstrapfileinput': vendors + 'bootstrap-fileinput/',
'bootstrapValidator': vendors + 'bootstrapvalidator/dist/',
'datatables': vendors + 'datatables.net/',
'datatablesbs4': vendors + 'datatables.net-bs4/',
'datedropper': vendors + 'datedropper/',
'fontawesome': vendors + 'font-awesome/',
'icheck': vendors + 'icheck/',
'jquerynicescroll': vendors + 'jquery.nicescroll/dist/',
'moment': vendors + 'moment/',
'simplelineicons': vendors + 'simple-line-icons/',
'slimscroll': vendors + 'jquery-slimscroll/',
};
/*
|--------------------------------------------------------------------------
| Mix Asset Management
|--------------------------------------------------------------------------
|
| Mix provides a clean, fluent API for defining some Webpack build steps
| for your Laravel application. By default, we are compiling the Sass
| file for the application as well as bundling up all the JS files.
|
*/
mix.js('resources/js/app.js', 'public/js')
.sass('resources/sass/app.scss', 'public/css');
mix.copy(srcCss, destCss);
mix.copy(srcImg, destImg);
mix.copy(srcJs + 'src', destJs);
// Copy fonts straight to public
mix.copy(srcCss + 'themify-icons/' + 'fonts', destFonts);
mix.copy(paths.fontawesome + 'fonts', destFonts);
// bootstrap-fileinput
mix.copy(paths.bootstrapfileinput + 'css/fileinput.min.css', destVendors + 'bootstrap-fileinput/css/');
mix.copy(paths.bootstrapfileinput + 'js/fileinput.min.js', destVendors + 'bootstrap-fileinput/js/');
mix.copy(paths.bootstrapfileinput + 'themes/fa/theme.js', destVendors + 'bootstrap-fileinput/js/');
mix.copy(paths.bootstrapfileinput + 'img/loading.gif', destVendors + 'bootstrap-fileinput/img');
//bootstrapvalidator
mix.copy(paths.bootstrapValidator + 'css/bootstrapValidator.min.css', destVendors + 'bootstrapvalidator/css');
mix.copy(paths.bootstrapValidator + 'js/bootstrapValidator.min.js', destVendors + 'bootstrapvalidator/js');
// datatables
mix.copy(paths.datatables + 'js/jquery.dataTables.js', destVendors + 'datatables/js');
mix.copy(paths.datatablesbs4 + 'js/dataTables.bootstrap4.js', destVendors + 'datatables/js');
mix.copy(paths.datatablesbs4 + 'css/dataTables.bootstrap4.css', destVendors + 'datatables/css');
// datedropper
mix.copy(paths.datedropper + 'datedropper.min.css', destVendors + 'datedropper');
mix.copy(paths.datedropper + 'datedropper.min.js', destVendors + 'datedropper');
mix.copy(paths.datedropper + 'dd-icon', destVendors + 'datedropper/dd-icon');
//icheck
mix.copy(paths.icheck + 'icheck.min.js', destVendors + 'iCheck/js');
mix.copy(paths.icheck + 'skins/', destVendors + 'iCheck/css');
//jquery.nicescroll
mix.copy(paths.jquerynicescroll + 'jquery.nicescroll.min.js', destVendors + 'jquerynicescroll');
// moment
mix.copy(paths.moment + 'min/moment.min.js', destVendors + 'moment/js');
//simple-line-icons
mix.copy(paths.simplelineicons + 'css/simple-line-icons.css', destVendors + 'simple-line-icons/css/simple-line-icons.css');
mix.copy(paths.simplelineicons + 'fonts', destVendors + 'simple-line-icons/fonts');
//slimscroll
mix.copy(paths.slimscroll + 'jquery.slimscroll.min.js', destVendors + 'jquery-slimscroll/js');
mix.styles(
[
destCss + 'font-awesome.min.css',
destCss + 'themify-icons/css/themify-icons.css',
destCss + 'custom_css/metisMenu.css',
], destCss + 'app2.css');
mix.scripts(
[
destJs + 'custom_js/leftmenu.js',
destVendors + 'jquerynicescroll/jquery.nicescroll.min.js',
destVendors + 'jquery-slimscroll/js/jquery.slimscroll.min.js',
destJs + 'custom_js/rightside_bar.js',
], destJs + 'app2.js');
/* custom css and js for dark */
mix.sass(resourcesAssets + 'sass/custom.scss', destCss);