forked from catchup-forks/cms-2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.mix.js
118 lines (97 loc) · 4.66 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
const webpack = require('webpack');
let mix = require('laravel-mix');
var path = require('path');
mix.setPublicPath('public');
mix.options({ processCssUrls: false });
mix.disableSuccessNotifications()
.less('resources/assets/photonCms/core/less/proton.less', 'public/css')
.less('resources/assets/photonCms/core/less/bootstrap.less', 'public/css')
.less('resources/assets/photonCms/dependencies/less/custom.less', 'public/css')
.styles([
'resources/assets/photonCms/core/css/vendor/bootstrap-switch.css',
'resources/assets/photonCms/core/css/vendor/cropper/cropper.css',
'resources/assets/photonCms/core/css/vendor/select2/select2.css',
'resources/assets/photonCms/core/css/vendor/select2/select2-bootstrap.css',
'resources/assets/photonCms/core/css/vendor/jstree-theme/proton/style.css',
'resources/assets/photonCms/core/css/vendor/uniformjs/css/uniform.default.css',
'resources/assets/photonCms/core/css/vendor/nprogress.css',
'resources/assets/photonCms/core/css/vendor/redactor.css',
'resources/assets/photonCms/core/css/vendor/bootstrap-iconpicker.css',
'resources/assets/photonCms/core/css/vendor/animate.css',
'resources/assets/photonCms/core/css/font-awesome.css',
'resources/assets/photonCms/core/css/font-titillium.css',
'resources/assets/photonCms/core/css/vendor/jquery.pnotify.default.css'
], 'public/css/vendor.css')
.copyDirectory('resources/assets/photonCms/core/images', 'public/images')
.copyDirectory('resources/assets/photonCms/dependencies/images', 'public/images')
.copyDirectory('resources/assets/photonCms/core/css/fonts', 'public/css/fonts')
.copyDirectory('resources/assets/photonCms/core/css/vendor', 'public/css/vendor')
.js('resources/assets/photonCms/core/js/main.js', 'public/js/app.js');
if (process.env.npm_lifecycle_event !== 'hot') {
mix.version();
}
mix.sourceMaps()
.scripts([
'resources/assets/photonCms/core/js/vendor/jquery-3.2.1.min.js',
'resources/assets/photonCms/core/js/vendor/jquery.cookie.js',
'resources/assets/photonCms/core/js/vendor/nprogress.js',
'resources/assets/photonCms/core/js/vendor/bootstrap-datetimepicker.js',
'resources/assets/photonCms/core/js/vendor/bootstrap-switch.js',
'resources/assets/photonCms/core/js/vendor/cropper.js',
'resources/assets/photonCms/core/js/vendor/Chart.min.js',
'resources/assets/photonCms/core/js/vendor/fileinput.js',
'resources/assets/photonCms/core/js/vendor/jquery-ui.min.js',
'resources/assets/photonCms/core/js/vendor/jquery.imgareaselect.js',
'resources/assets/photonCms/core/js/vendor/jquery.pnotify.min.js',
'resources/assets/photonCms/core/js/vendor/jquery.uniform.min.js',
'resources/assets/photonCms/core/js/vendor/jquery.ui.touch.js',
'resources/assets/photonCms/core/js/vendor/jstree.min.js',
'resources/assets/photonCms/core/js/vendor/modernizr.js',
'resources/assets/photonCms/core/js/vendor/moment-with-locales.js',
'resources/assets/photonCms/core/js/vendor/parsley.min.js',
'resources/assets/photonCms/core/js/vendor/redactor.js',
'resources/assets/photonCms/core/js/vendor/select2.full.min.js',
'resources/assets/photonCms/core/js/vendor/bootstrap.min.js',
'resources/assets/photonCms/core/js/vendor/favico.js',
'resources/assets/photonCms/core/js/vendor/iconset/iconset-fontawesome-4.7.0.js',
'resources/assets/photonCms/core/js/vendor/bootstrap-iconpicker.js',
], 'public/js/vendor.js');
if (process.env.npm_lifecycle_event !== 'hot') {
mix.version();
}
mix.browserSync({
proxy: 'photoncms.test',
files: [
'resources/**'
],
open: false,
});
mix.webpackConfig({
plugins: [
new webpack.ProvidePlugin({
introJs: ['intro.js', 'introJs']
})
],
resolve: {
alias: {
'@': path.resolve(__dirname, 'resources/assets/photonCms/core/js/config'),
'_': path.resolve(__dirname, 'resources/assets/photonCms/core/js'),
'~': path.resolve(__dirname, 'resources/assets/photonCms/dependencies/js')
}
},
module: {
loaders: [
{
test: /\.json$/,
exclude: /node_modules/,
loader: 'json-loader'
}
],
rules: [
{
test: /\.md$/,
use: 'raw-loader',
}
]
},
});