-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
38 lines (34 loc) · 1.26 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
var elixir = require('laravel-elixir');
var cleanCSS = require('gulp-clean-css');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
/*
|--------------------------------------------------------------------------
| 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.
|
*/
elixir(function(mix) {
mix.sass('app.scss')
mix.scripts([
'../../../node_modules/jquery/dist/jquery.js',
'../../../node_modules/bootstrap-sass/assets/javascripts/bootstrap.js',
'../../../node_modules/datatables.net/js/jquery.dataTables.js',
'../../../node_modules/js-cookie/src/js.cookie.js',
'../../../resources/assets/js/app.js',
], 'public/js/app.js');
});
gulp.task('compress', function () {
gulp.src('public/css/app.css')
.pipe(rename("app.min.css"))
.pipe(cleanCSS())
.pipe(gulp.dest('public/css'))
gulp.src('public/js/app.js')
.pipe(rename("app.min.js"))
.pipe(uglify())
.pipe(gulp.dest('public/js'))
});