-
-
Notifications
You must be signed in to change notification settings - Fork 92
/
webpack.mix.js
183 lines (152 loc) · 5.59 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
const mix = require('laravel-mix');
/*
|--------------------------------------------------------------------------
| 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.
|
*/
var COMPILE = 'all';
var public = 'public';
var pathBase = 'resources/assets';
if (COMPILE == 'all') {
// copy all the fonts
mix.copy(pathBase + '/fonts', public + '/fonts');
// copy all the sound
// mix.copy(pathBase + '/sounds', public + '/sounds');
// copy all the images
mix.copy(pathBase + '/images', public + '/images');
}
// website assets
if (COMPILE == 'website' || COMPILE == 'all') {
var path = pathBase + '/';
var pathCSS = path + '/css/';
var pathJS = path + '/js/';
mix.sass('resources/assets/sass/vendor.scss', pathCSS )
.setPublicPath('resources');
mix.styles([
pathCSS + 'vendor.css',
pathCSS + 'vendor/animate.css',
pathCSS + 'vendor/fancybox.css',
pathCSS + 'vendor/font-awesome.css',
pathCSS + 'vendor/jquery.fancybox.css',
pathCSS + 'app/faq.css',
pathCSS + 'app/colors.css',
pathCSS + 'app/pricing.css',
pathCSS + 'app/utilities.css',
pathCSS + 'app/testimonials.css',
pathCSS + 'website.css',
pathCSS + 'overrides.css',
], public + '/css/website.css');
// website javascripts
mix.scripts([
pathJS + 'vendor/jquery-3.2.1.js',
pathJS + 'vendor/popper.js', // bootstrap dependency
pathJS + 'vendor/bootstrap.js',
pathJS + 'vendor/jquery.fancybox.min.js',
pathJS + 'vendor/lazysizes.min.js',
//pathJS + 'vendor/owl.carousel.min.js',
pathJS + 'titan/alerts.js',
pathJS + 'titan/buttons.js',
pathJS + 'titan/forms.js',
pathJS + 'titan/google_maps.js',
pathJS + 'titan/social_media.js',
pathJS + 'titan/pagination.js',
pathJS + 'titan/utils.js',
pathJS + 'website.js',
], public + '/js/website.js');
}
// admin assets
/* // disabled for titan starter on install
if (COMPILE == 'admin' || COMPILE == 'all') {
var path = pathBase + '/admin/';
// copy all the fonts
mix.copy(path + 'fonts', public + '/fonts');
// copy all the sounds
mix.copy(path + 'sounds', public + '/sounds');
// copy all the images
mix.copy(path + 'images', public + '/images/admin');
var pathCSS = path + '/css/';
mix.styles([
pathCSS + 'vendor/bootstrap.css',
pathCSS + 'vendor/font-awesome.css',
pathCSS + 'vendor/ionicons.css',
// plugins
pathCSS + 'vendor/select2.css',
pathCSS + 'vendor/lightbox.css',
pathCSS + 'vendor/dropzone.css',
pathCSS + 'vendor/summernote.css',
pathCSS + 'vendor/daterangepicker.css',
pathCSS + 'vendor/pace-theme-flash.css',
pathCSS + 'vendor/bootstrap-datetimepicker.css',
pathCSS + 'vendor/datatables.bootstrap.css',
pathCSS + 'vendor/responsive.bootstrap.css',
pathCSS + 'vendor/cropper.css',
// admin
pathCSS + 'admin-lte.css',
pathCSS + 'skins/skin-blue.css',
// pathCSS + 'skins/skin-blue-light.css',
// pathCSS + 'skins/skin-black.css',
// pathCSS + 'skins/skin-black-light.css',
// pathCSS + 'skins/skin-green.css',
// pathCSS + 'skins/skin-green-light.css',
// pathCSS + 'skins/skin-purple.css',
// pathCSS + 'skins/skin-purple-light.css',
// pathCSS + 'skins/skin-red.css',
// pathCSS + 'skins/skin-red-light.css',
// pathCSS + 'skins/skin-yellow.css',
// pathCSS + 'skins/skin-yellow-light.css',
// // titan
pathCSS + 'titan/titan.css',
pathCSS + 'titan/charts.css',
pathCSS + 'titan/superbox.css',
pathCSS + 'titan/nestable.css',
pathCSS + 'titan/datatables.css',
pathCSS + 'titan/checkboxes.css',
pathCSS + 'titan/notify.css',
pathCSS + 'overrides.css',
], public + '/css/admin.css');
var pathJS = path + '/js/';
// admin javascripts
mix.scripts([
// jquery
pathJS + 'vendor/jquery-3.2.1.js',
// bootstrap
pathJS + 'vendor/bootstrap.js',
// plugins
pathJS + 'vendor/pace.js',
pathJS + 'vendor/chart.js',
pathJS + 'vendor/select2.js',
pathJS + 'vendor/dropzone.js',
pathJS + 'vendor/lightbox.js',
pathJS + 'plugins/fastclick.js',
pathJS + 'vendor/summernote.js',
pathJS + 'vendor/jquery.nestable.js',
pathJS + 'vendor/jquery.cookie.js',
pathJS + 'vendor/cropper.js',
// date picker
pathJS + 'vendor/moment.js',
pathJS + 'vendor/daterangepicker.js',
pathJS + 'vendor/bootstrap-datetimepicker.js',
// datatables | 1.10.11
// https://datatables.net/extensions/responsive/classes
pathJS + 'vendor/jquery.datatables.js',
pathJS + 'vendor/datatables.bootstrap.js',
pathJS + 'vendor/datatables.responsive.js',
// titan
pathJS + 'titan/titan.js',
pathJS + 'titan/buttons.js',
pathJS + 'titan/notify.js',
pathJS + 'titan/datatables.js',
pathJS + 'titan/pagination.js',
pathJS + 'titan/google_maps.js',
pathJS + 'titan/notifications.js',
// admin
pathJS + 'admin-lte.js',
pathJS + 'admin.js',
], public + '/js/admin.js');
}
*/