-
Notifications
You must be signed in to change notification settings - Fork 4
/
webpack.mix.js
91 lines (71 loc) · 2.14 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
let mix = require('laravel-mix')
let path = require('path')
let rtlcss = require('rtlcss')
let bsConfig = require('./bs-config')
mix.setResourceRoot('../')
mix.setPublicPath(path.resolve('./'))
mix.disableNotifications()
mix.webpackConfig({
watchOptions: { ignored: [
path.posix.resolve(__dirname, './node_modules'),
path.posix.resolve(__dirname, './dist'),
] }
})
mix.ts('assets/js/core.ts', 'dist/js').sourceMaps()
mix.ts('assets/js/customize-preview.ts', 'dist/js').sourceMaps()
mix.ts('assets/js/menu.ts', 'dist/js').sourceMaps()
mix.postCss('assets/css/core.css', 'dist/css').sourceMaps()
mix.postCss('assets/css/editor.css', 'dist/css').sourceMaps()
mix.postCss(
'assets/css/core-rtl.css',
'dist/css',
[rtlcss()]
).sourceMaps()
mix.postCss(
'assets/css/editor-rtl.css',
'dist/css',
[rtlcss()]
).sourceMaps()
mix.copy('vendor/grottopress/wordpress-posts/dist/css/posts.css', 'dist/vendor')
mix.copy(
'vendor/grottopress/wordpress-posts/dist/css/posts-rtl.css',
'dist/vendor'
)
mix.copy(
'vendor/grottopress/wordpress-breadcrumbs/src/lang',
'dist/vendor/grotto-wp-breadcrumbs'
)
mix.copy(
'vendor/grottopress/wordpress-field/src/lang',
'dist/vendor/grotto-wp-field'
)
mix.copy(
'vendor/grottopress/wordpress-page/src/lang',
'dist/vendor/grotto-wp-page'
)
mix.copy(
'vendor/grottopress/wordpress-posts/src/lang',
'dist/vendor/grotto-wp-posts'
)
mix.copy('node_modules/html5shiv/dist/html5shiv.min.js', 'dist/vendor')
mix.copy('node_modules/what-input/dist/what-input.min.js', 'dist/vendor')
mix.copy('node_modules/jquery/dist/jquery.min.js', 'dist/vendor')
mix.copy('node_modules/respond.js/dest/respond.min.js', 'dist/vendor')
mix.copy(
'node_modules/jquery-migrate/dist/jquery-migrate.min.js',
'dist/vendor'
)
mix.copy(
'node_modules/@fortawesome/fontawesome-free/js/all.min.js',
'dist/vendor/font-awesome.min.js'
)
mix.copy(
'node_modules/@fortawesome/fontawesome-free/js/v4-shims.min.js',
'dist/vendor/font-awesome-v4-shims.min.js'
)
mix.browserSync(bsConfig)
if (mix.inProduction()) {
mix.version()
} else {
Mix.manifest.refresh = _ => void 0
}