-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.mix.js
93 lines (91 loc) · 3.16 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
let 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.
|
*/
mix.sass(
'resources/assets/sass/app.scss',
'public/css/app.css',
{
includePaths:
[
'node_modules/foundation-sites/scss',
'node_modules/motion-ui/src'
]
}
)
.sass(
'resources/assets/sass/invoice.scss',
'public/css/invoice.css'
)
.styles(
[
'node_modules/datatables.net-zf/css/dataTables.foundation.css',
'node_modules/font-awesome/css/font-awesome.min.css',
'public/css/app.css'
],
'public/css/all.css'
)
.copy(
'node_modules/jquery/dist/jquery.min.js',
'public/js/vendor/jquery.min.js'
)
.copy(
'node_modules/what-input/dist/what-input.min.js',
'public/js/vendor/what-input.min.js'
)
// Foundation stopped working when building it modularly so we include
// the complete foundation.min.js now instead.
// The old code:
// .webpack(
// [
// 'node_modules/foundation-sites/js/foundation.core.js',
// 'node_modules/foundation-sites/js/foundation.util.box.js',
// 'node_modules/foundation-sites/js/foundation.util.keyboard.js',
// 'node_modules/foundation-sites/js/foundation.util.mediaQuery.js',
// 'node_modules/foundation-sites/js/foundation.util.motion.js',
// 'node_modules/foundation-sites/js/foundation.util.triggers.js',
// 'node_modules/foundation-sites/js/foundation.reveal.js',
// ],
// 'public/js/vendor/foundation.js',
// '.',
// {
// // The default options exclude everything in the node_modules folder (https://github.com/JeffreyWay/laravel-elixir-webpack-official/blob/master/src/index.js)
// module: {
// loaders: [{ test: /\.js$/, loader: 'buble' }]
// }
// }
// )
.copy(
'node_modules/foundation-sites/dist/js/foundation.min.js',
'public/js/vendor/foundation.js'
)
.js(
[
'node_modules/datatables.net/js/jquery.dataTables.js',
'node_modules/datatables.net-zf/js/dataTables.foundation.js',
],
'public/js/vendor/datatables.js'
)
.copy(
[
'node_modules/datatables.net-zf/images/sort_asc.png',
'node_modules/datatables.net-zf/images/sort_asc_disabled.png',
'node_modules/datatables.net-zf/images/sort_both.png',
'node_modules/datatables.net-zf/images/sort_desc.png',
'node_modules/datatables.net-zf/images/sort_desc_disabled.png'
],
'public/images'
)
.copy(
[
'node_modules/font-awesome/fonts'
],
'public/fonts'
);