-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
63 lines (56 loc) · 2.09 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
var elixir = require('laravel-elixir');
var wiredep = require('wiredep').stream;
var gulp = require('gulp');
var chalk = require('chalk');
var shell = require('gulp-shell');
var gutil = require('gulp-util');
/*
|--------------------------------------------------------------------------
| 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');
});
gulp.task('migrate', shell.task([
'php artisan migrate --path=database/migrations --ansi'
]));
gulp.task('bower', function () {
gulp.src(['./resources/views/theme/layout/master.blade.php'])
.pipe(wiredep({
ignorePath: '../../../../public',
onFileUpdated: function(filePath){
console.log(chalk.red.bold("Updated: ") + chalk.black(filePath));
},
fileTypes: {
php: {
replace: {
js: '<script src="{{ url(\'{{filePath}}\') }}"></script>',
css: '<link rel="stylesheet" href="{{ url(\'{{filePath}}\') }}" />'
}
}
}
}))
.pipe(gulp.dest('./resources/views/theme/layout'))
gulp.src(['./resources/views/theme/layout/admin/master.blade.php'])
.pipe(wiredep({
ignorePath: '../../../../../public',
onFileUpdated: function(filePath){
console.log(chalk.red.bold("Updated: ") + chalk.black(filePath));
},
fileTypes: {
php: {
replace: {
js: '<script src="{{ url(\'{{filePath}}\') }}"></script>',
css: '<link rel="stylesheet" href="{{ url(\'{{filePath}}\') }}" />'
}
}
}
}))
.pipe(gulp.dest('./resources/views/theme/layout/admin'))
});