-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
60 lines (55 loc) · 1.65 KB
/
gulpfile.js
File metadata and controls
60 lines (55 loc) · 1.65 KB
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
const elixir = require('laravel-elixir'),
postStylus = require('poststylus'),
lost = require('lost'),
axis = require('axis'),
rupture = require('rupture'),
htmlmin = require('gulp-htmlmin');
require('laravel-elixir-vue');
require('laravel-elixir-imagemin');
/*
|--------------------------------------------------------------------------
| 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.config.sourcemaps = true;
elixir.extend('compress', function() {
new elixir.Task('compress', function() {
return gulp.src('./storage/framework/views/*')
.pipe(htmlmin({
collapseWhitespace: true,
removeAttributeQuotes: true,
removeComments: true,
minifyJS: true,
}))
.pipe(gulp.dest('./storage/framework/views/'));
})
.watch('./resources/views/**/*.blade.php');
});
elixir(mix => {
mix
.stylus('app.styl', null, {
compress: true,
use: [
axis(),
rupture(),
postStylus(['lost', 'postcss-position'])
]
})
.webpack('app.js')
.version('css/app.css')
.imagemin({
optimizationLevel: 3,
progressive: true,
interlaced: true
})
.browserSync({
proxy: 'homestead.app',
notify: false
})
.compress();
});