-
Notifications
You must be signed in to change notification settings - Fork 14
/
gulpfile.js
49 lines (42 loc) · 1.62 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
var dir, elixir = require('laravel-elixir');
/*
|--------------------------------------------------------------------------
| 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 Sass
| file for our application, as well as publishing vendor resources.
|
*/
dir = {
asset: {
css: 'public/resources/css',
font: 'public/resources/fonts',
img: 'public/resources/img',
js: 'public/resources/js'
},
build: 'public/build',
theme: 'resources/html',
vendor: 'vendor/bower_components'
};
elixir(function(mix) {
mix.sass('app.scss', dir.asset.css, {
includePaths: [dir.vendor+'/']
});
mix.copy(dir.theme+'/assets/js/ie10-viewport-bug-workaround.js', dir.asset.js+'/ie.js')
.copy(dir.vendor+'/jquery/dist/jquery.min.js', dir.asset.js+'/vendor/jquery.min.js')
.copy(dir.vendor+'/jquery/dist/jquery.min.map', dir.asset.js+'/vendor/jquery.min.map')
.copy(dir.vendor+'/bootstrap-sass/assets/javascripts/bootstrap.min.js', dir.asset.js+'/vendor/bootstrap.min.js')
.copy(dir.vendor+'/font-awesome/fonts', dir.asset.font)
.copy(dir.theme+'/assets/fonts', dir.asset.font)
.copy(dir.theme+'/assets/img/header.jpg', dir.asset.img+'/header.jpg');
mix.styles([
'app.css'
], dir.asset.css+'/all.css', dir.asset.css);
mix.scripts([
'vendor/jquery.min.js',
'vendor/bootstrap.min.js'
], dir.asset.js+'/all.js', dir.asset.js);
mix.version([dir.asset.css+'/all.css', dir.asset.js+'/all.js']);
});