-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgulpfile.js
137 lines (125 loc) · 5.2 KB
/
gulpfile.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
125
126
127
128
129
130
131
132
133
134
135
136
137
var elixir = require('laravel-elixir');
/*
|--------------------------------------------------------------------------
| Additional elixir tasks & modules
|--------------------------------------------------------------------------
*/
require('laravel-elixir-remove');
/*
|--------------------------------------------------------------------------
| The build process
|--------------------------------------------------------------------------
*/
elixir(function (mix) {
/*
|--------------------------------------------------------------------------
| Enable some nice stuff
|--------------------------------------------------------------------------
|
| Set browserSync.proxy to your local dev domain name
*/
mix.browserSync({
proxy: 'laralabs.dev'
});
/*
|--------------------------------------------------------------------------
| Copy required files from vendor directories to public
|--------------------------------------------------------------------------
*/
mix.copy(
'bower_components/components-font-awesome/fonts',
'public/assets/fonts/font-awesome');
/*
|--------------------------------------------------------------------------
| Frontend assets
|--------------------------------------------------------------------------
|
| Based on Bootstrap + Bootswatch skin
|
| 1. Process SCSS stylesheets
| 2. Combine pre-processed CSS files
| 3. Combine pre-processed JS files
*/
mix
.sass([
'frontend/app.scss'
],
'resources/assets/css/tmp/frontend/app-sass.css')
.styles([
'tmp/frontend/app-sass.css'
],
'public/assets/css/frontend/app.css')
.scripts([
// Bootstrap
'../../../bower_components/bootstrap-sass/assets/javascripts/bootstrap/affix.js',
'../../../bower_components/bootstrap-sass/assets/javascripts/bootstrap/alert.js',
'../../../bower_components/bootstrap-sass/assets/javascripts/bootstrap/button.js',
'../../../bower_components/bootstrap-sass/assets/javascripts/bootstrap/carousel.js',
'../../../bower_components/bootstrap-sass/assets/javascripts/bootstrap/collapse.js',
'../../../bower_components/bootstrap-sass/assets/javascripts/bootstrap/dropdown.js',
'../../../bower_components/bootstrap-sass/assets/javascripts/bootstrap/modal.js',
'../../../bower_components/bootstrap-sass/assets/javascripts/bootstrap/popover.js',
'../../../bower_components/bootstrap-sass/assets/javascripts/bootstrap/scrollspy.js',
'../../../bower_components/bootstrap-sass/assets/javascripts/bootstrap/tab.js',
'../../../bower_components/bootstrap-sass/assets/javascripts/bootstrap/tooltip.js',
'../../../bower_components/bootstrap-sass/assets/javascripts/bootstrap/transition.js',
// App
'frontend/app.js'
],
'public/assets/js/frontend/app.js');
/*
|--------------------------------------------------------------------------
| Backend assets
|--------------------------------------------------------------------------
|
| Based on Bootstrap + AdminLTE
|
| 1. Process SCSS stylesheets
| 2. Combine pre-processed CSS files
| 3. Combine pre-processed JS files
*/
mix
.sass([
'backend/app.scss'
],
'resources/assets/css/tmp/backend/app-sass.css')
.styles([
// Admin LTE + bundled Bootstrap
'../../../bower_components/admin-lte/bootstrap/css/bootstrap.css',
'../../../bower_components/admin-lte/dist/css/AdminLTE.css',
'../../../bower_components/admin-lte/dist/css/skins/skin-blue.css',
// App
'tmp/backend/app-sass.css'
],
'public/assets/css/backend/app.css')
.scripts([
// Admin LTE + bundled Bootstrap
'../../../bower_components/admin-lte/plugins/jQuery/jQuery-2.2.0.min.js',
'../../../bower_components/admin-lte/bootstrap/js/bootstrap.js',
'../../../bower_components/admin-lte/dist/js/app.js',
// App
'backend/app.js'
],
'public/assets/js/backend/app.js');
/*
|--------------------------------------------------------------------------
| Apply version control to prevent cache problems
|--------------------------------------------------------------------------
*/
mix.version([
// Frontend
"assets/css/frontend/app.css",
"assets/js/frontend/app.js",
// Backend
"assets/css/backend/app.css",
"assets/js/backend/app.js"]);
/*
|--------------------------------------------------------------------------
| Clean-up temporary files
|--------------------------------------------------------------------------
*/
mix.remove([
'resources/assets/css/tmp',
'public/assets/css',
'public/assets/js'])
});