forked from mrakodol/Laravel-5-Bootstrap-3-Starter-Site
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
78 lines (65 loc) · 2.47 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
var gulp = require("gulp");
var bower = require("gulp-bower");
var elixir = require("laravel-elixir");
gulp.task('bower', function() {
return bower();
});
/*
|--------------------------------------------------------------------------
| 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.
|
*/
var paths = {
'jquery': 'vendor/jquery-legacy/dist',
'bootstrap': 'vendor/bootstrap-sass/assets',
'bootswatch': 'vendor/bootswatch-sass',
'fontawesome': 'vendor/font-awesome',
'metisMenu': 'vendor/metisMenu/dist',
'colorbox': 'vendor/jquery-colorbox',
'dataTables': 'vendor/datatables/media',
'dataTablesBootstrap3Plugin': 'vendor/datatables-bootstrap3-plugin/media'
};
elixir.config.sourcemaps = false;
elixir(function (mix) {
// Run bower install
mix.task('bower');
// Copy fonts straight to public
mix.copy(paths.bootstrap + '/fonts/bootstrap/**', 'public/fonts');
mix.copy(paths.fontawesome + '/fonts/**', 'public/fonts');
// Copy images straight to public
mix.copy(paths.colorbox + '/example3/images/**', 'public/img');
// Compile SASS and output to default resource directory
mix.sass('app.scss', 'resources/css', {
includePaths: [
'resources/' + paths.bootstrap + '/stylesheets/',
'resources/' + paths.bootswatch + '/',
'resources/' + paths.fontawesome + '/scss/'
]
});
// Merge CSSs
mix.styles([
paths.colorbox + '/example3/colorbox.css',
paths.dataTablesBootstrap3Plugin + '/css/datatables-bootstrap3.css',
paths.metisMenu + '/metisMenu.css',
'css/app.css' // app.css is generated by sass and has some overrides
], 'public/css/all.css', 'resources/');
// Merge scripts
mix.scripts([
paths.jquery + '/jquery.js',
paths.bootstrap + '/javascripts/bootstrap.js',
paths.dataTables + '/js/jquery.dataTables.js',
paths.dataTablesBootstrap3Plugin + '/js/datatables-bootstrap3.js',
paths.colorbox + '/jquery.colorbox.js',
paths.metisMenu + '/metisMenu.js'
], 'public/js/all.js', 'resources/');
// Cache-bust all.css and all.js
mix.version([
'public/css/all.css',
'public/js/all.js'
]);
});