forked from FTXInfotech/laravel-adminpanel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.mix.js
executable file
·68 lines (66 loc) · 2.9 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
const mix = require('laravel-mix');
const WebpackRTLPlugin = require('webpack-rtl-plugin');
/*
|--------------------------------------------------------------------------
| 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/frontend/app.scss', 'public/css/frontend.css')
.sass('resources/assets/sass/backend/app.scss', 'public/css/backend.css')
.styles([
'public/css/plugin/datatables/jquery.dataTables.min.css',
'public/css/backend/plugin/datatables/dataTables.bootstrap.min.css',
'public/css/plugin/datatables/buttons.dataTables.min.css',
'public/js/select2/select2.css',
'public/css/bootstrap.min.css',
'public/css/custom-style.css',
'public/css/loader.css',
'public/css/bootstrap-datetimepicker.min.css',
'client/build/client-modules.min.css',
], 'public/css/backend-custom.css')
.js([
'resources/assets/js/frontend/app.js',
'resources/assets/js/plugin/sweetalert/sweetalert.min.js',
'resources/assets/js/plugins.js',
'client/build/client-modules.min.js',
], 'public/js/frontend.js')
.js([
'resources/assets/js/backend/app.js',
'resources/assets/js/plugin/sweetalert/sweetalert.min.js',
'resources/assets/js/plugins.js'
], 'public/js/backend.js')
//Copying all directories of tinymce to public folder
.copyDirectory('node_modules/tinymce/plugins', 'public/js/plugins')
.copyDirectory('node_modules/tinymce/skins', 'public/js/skins')
.copyDirectory('node_modules/tinymce/themes', 'public/js/themes')
.scripts([
"node_modules/moment/moment.js",
"node_modules/select2/dist/js/select2.full.js",
"public/js/bootstrap-datetimepicker.min.js",
"public/js/backend/custom-file-input.js",
"public/js/backend/notification.js",
"public/js/backend/admin.js"
], 'public/js/backend-custom.js')
//Datatable js
.scripts([
'node_modules/datatables.net/js/jquery.dataTables.js',
'public/js/plugin/datatables/dataTables.bootstrap.min.js',
'node_modules/datatables.net-buttons/js/dataTables.buttons.js',
'node_modules/datatables.net-buttons/js/buttons.flash.js',
'public/js/plugin/datatables/jszip.min.js',
'public/js/plugin/datatables/pdfmake.min.js',
'public/js/plugin/datatables/vfs_fonts.js',
'node_modules/datatables.net-buttons/js/buttons.html5.js',
'node_modules/datatables.net-buttons/js/buttons.print.js',
], 'public/js/dataTable.js')
.webpackConfig({
plugins: [
new WebpackRTLPlugin('/css/[name].rtl.css')
]
})
.version();