-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathelixir-extensions.js
More file actions
30 lines (27 loc) · 988 Bytes
/
elixir-extensions.js
File metadata and controls
30 lines (27 loc) · 988 Bytes
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
const gulp = require('gulp');
const Elixir = require('laravel-elixir');
const Task = Elixir.Task;
const htmlmin = require('gulp-htmlmin');
const rtlcss = require('gulp-rtlcss');
const rename = require('gulp-rename');
Elixir.extend('compressHtml', function() {
new Task('compressHtml', function() {
const opts = {
collapseWhitespace: true,
removeAttributeQuotes: true,
removeComments: true,
minifyJS: true
};
return gulp.src('./storage/framework/views/*')
.pipe(htmlmin(opts))
.pipe(gulp.dest('./storage/framework/views/'))
}).watch('./storage/framework/views/*')
});
Elixir.extend('rtlCss', function() {
new Task('rtlCss', function() {
return gulp.src('./resources/assets/css/backend/app.css')
.pipe(rtlcss())
.pipe(rename({ basename: 'backend', suffix: '-rtl' }))
.pipe(gulp.dest('./public/css/'));
})
});