This repository has been archived by the owner on Sep 19, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 22
/
webpack.mix.js
125 lines (103 loc) · 4.11 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
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.
|
*/
// 三方库直接copy
mix.copyDirectory('resources/assets/ztree', 'public/static-third/ztree');
mix.copyDirectory('resources/assets/editormd', 'public/static-third/editormd');
mix.copyDirectory('resources/assets/layer', 'public/static-third/layer');
mix.copyDirectory('resources/assets/paginator', 'public/static-third/paginator');
// 公共资源 图片、字体文件等
mix.copyDirectory('resources/assets/common/img/', 'public/static-common/img');
mix.copyDirectory('resources/assets/common/font/', 'public/static-common/font');
// 公共资源-JS
mix.scripts([
'resources/assets/common/js/jquery-1.11.1.min.js',
'resources/assets/common/js/jquery.form.js',
'resources/assets/common/js/TweenMax.min.js',
'resources/assets/common/js/resizeable.js',
'resources/assets/common/js/joinable.js',
'resources/assets/common/js/bootstrap.min.js',
// 'resources/assets/common/js/xenon-api.js',
// 'resources/assets/common/js/xenon-toggles.js',
// 'resources/assets/common/js/xenon-custom.js',
], 'public/static-common/js/common.js');
// 公共资源-CSS
mix.styles([
'resources/assets/common/css/font-awesome.min.css',
'resources/assets/common/css/linecons.css',
'resources/assets/common/css/bootstrap.css',
// 'resources/assets/common/css/xenon-components.css',
'resources/assets/common/css/xenon-core.css',
// 'resources/assets/common/css/xenon-forms.css',
// 'resources/assets/common/css/xenon-skins.css',
'resources/assets/common/css/common.css',
], 'public/static-common/css/common.css');
// 欢迎页资源
mix.styles([
'resources/assets/welcome/css/app.css'
], 'public/static-welcome/css/app.css');
// 错误页
mix.styles([
'resources/assets/errors/css/app.css'
], 'public/static-errors/css/app.css');
// 导航站资源
mix.styles([
'resources/assets/navigation/css/app.css'
], 'public/static-navigation/css/app.css');
mix.scripts([
'resources/assets/common/js/xenon-custom.js'
], 'public/static-navigation/js/app.js');
// 博客资源
mix.styles([
'resources/assets/blog/css/app.css'
], 'public/static-blog/css/app.css');
mix.scripts([
'resources/assets/blog/js/app.js'
], 'public/static-blog/js/app.js');
// wiki 资源
mix.styles([
'resources/assets/wiki/css/app.css',
'resources/assets/admin/wiki/css/custom.css'
], 'public/static-wiki/css/app.css');
mix.scripts([
'resources/assets/wiki/js/ztree.config.js'
], 'public/static-wiki/js/app.js');
// Wiki 资源 - 复用部分 Wiki后台管理资源
mix.copyDirectory('resources/assets/admin/wiki/img/', 'public/static-wiki/img');
// 思维导图
mix.copyDirectory('resources/assets/xmind/css/', 'public/static-xmind/css');
mix.copyDirectory('resources/assets/xmind/js/', 'public/static-xmind/js');
mix.copyDirectory('resources/assets/xmind/img/', 'public/static-xmind/img');
// 关于页面资源
mix.styles([
'resources/assets/about/css/app.css'
], 'public/static-about/css/app.css');
// 留言板资源
mix.styles([
'resources/assets/guestbook/css/app.css'
], 'public/static-guestbook/css/app.css');
// 后台管理 - Wiki 资源
mix.styles([
'resources/assets/admin/wiki/css/custom.css'
], 'public/static-admin/wiki/css/app.css');
mix.scripts([
'resources/assets/admin/wiki/js/ztree.config.js',
'resources/assets/admin/wiki/js/editor.md.config.js'
], 'public/static-admin/wiki/js/app.js');
mix.styles([
'resources/assets/admin/xmind/css/app.css'
], 'public/static-admin/xmind/css/app.css');
mix.scripts([
'resources/assets/admin/xmind/js/app.js',
], 'public/static-admin/xmind/js/app.js');
mix.copyDirectory('resources/assets/admin/wiki/img/', 'public/static-admin/wiki/img');
mix.copyDirectory('resources/assets/test', 'public/static-test');
mix.version();