forked from sbine/bdgt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
133 lines (122 loc) · 4.28 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
var elixir = require('laravel-elixir');
elixir.config.js.uglify.options.compress.drop_console = false;
elixir.config.js.uglify.options.preserveComments = 'license';
var paths = {
node: 'node_modules',
node_full: '../../../node_modules',
assets_less: 'resources/assets/less',
assets_js: 'resources/assets/js',
css: 'public/css',
js: 'public/js',
images: 'public/img',
fonts: 'public/fonts',
};
/*
|--------------------------------------------------------------------------
| Elixir Asset Management
|--------------------------------------------------------------------------
|
| Elixir provides a clean, fluent API for defining some basic Gulp tasks
| for your Laravel application. By default, we are compiling the Less
| file for our application, as well as publishing vendor resources.
|
*/
elixir(function(mix) {
mix
.less(
'app.less',
paths.css + '/app.min.css'
)
.less(
'bootstrap.less',
paths.css + '/bootstrap.min.css'
)
.scripts([
paths.node_full + '/bootstrap/js/alert.js',
paths.node_full + '/bootstrap/js/button.js',
paths.node_full + '/bootstrap/js/collapse.js',
paths.node_full + '/bootstrap/js/dropdown.js',
paths.node_full + '/bootstrap/js/modal.js',
paths.node_full + '/bootstrap/js/tooltip.js',
paths.node_full + '/bootstrap/js/popover.js',
paths.node_full + '/bootstrap/js/tab.js',
paths.node_full + '/bootstrap/js/transition.js',
],
paths.js + '/bootstrap.min.js'
)
.scripts([
paths.node_full + '/moment/moment.js',
paths.node_full + '/moment-duration-format/lib/moment-duration-format.js',
],
paths.js + '/moment.min.js'
)
.scriptsIn(
'resources/assets/js',
paths.js + '/app.min.js'
)
// Copy dist JS when available
.copy(
paths.node + '/jquery/dist/jquery.min.js',
paths.js + '/jquery.min.js'
)
.copy(
paths.node + '/datatables/media/js/jquery.dataTables.min.js',
paths.js + '/jquery.datatables.min.js'
)
.copy(
paths.node + '/datatables.net-bs/js/dataTables.bootstrap.js',
paths.js + '/datatables-bootstrap.min.js'
)
.copy(
paths.node + '/bootstrap-slider/dist/bootstrap-slider.min.js',
paths.js + '/bootstrap-slider.min.js'
)
.copy(
paths.node + '/fullcalendar/dist/fullcalendar.min.js',
paths.js + '/fullcalendar.min.js'
)
.copy(
paths.node + '/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js',
paths.js + '/bootstrap-datepicker.min.js'
)
.copy(
paths.node + '/chart.js/dist/Chart.js',
paths.js + '/chart.min.js'
)
.copy(
paths.node + '/accounting-js/dist/accounting.umd.js',
paths.js + '/accounting.min.js'
)
// Copy dist CSS when available
.copy(
paths.node + '/font-awesome/css/font-awesome.min.css',
paths.css + '/font-awesome.min.css'
)
.copy(
paths.node + '/datatables/media/css/jquery.dataTables.min.css',
paths.css + '/jquery.datatables.min.css'
)
.copy(
paths.node + '/bootstrap-slider/dist/css/bootstrap-slider.min.css',
paths.css + '/bootstrap-slider.min.css'
)
.copy(
paths.node + '/fullcalendar/dist/fullcalendar.min.css',
paths.css + '/fullcalendar.min.css'
)
.copy(
paths.node + '/bootstrap-datepicker/dist/css/bootstrap-datepicker3.min.css',
paths.css + '/bootstrap-datepicker3.min.css'
)
// Compile source CSS for plugins that don't provide dist
.styles([
paths.node_full + '/datatables.net-bs/css/dataTables.bootstrap.css'
],
paths.css + '/datatables-bootstrap.min.css'
)
// Copy fonts
.copy(
paths.node + '/font-awesome/fonts',
paths.fonts
);
});