forked from contao-components/swipe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
41 lines (37 loc) · 916 Bytes
/
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
'use strict';
var gulp = require('gulp'),
csso = require('gulp-csso'),
ignore = require('gulp-ignore'),
rename = require('gulp-rename'),
uglify = require('gulp-uglify'),
pump = require('pump');
gulp.task('minify-css', function (cb) {
pump([
gulp.src('css/*.css'),
ignore.exclude('*.min.css'),
csso({
comments: false,
restructure: false
}),
rename({
suffix: '.min'
}),
gulp.dest('css')
],
cb
);
});
gulp.task('minify-js', function (cb) {
pump([
gulp.src('js/*.js'),
ignore.exclude('*.min.js'),
uglify(),
rename({
suffix: '.min'
}),
gulp.dest('js')
],
cb
);
});
gulp.task('default', gulp.parallel('minify-css', 'minify-js'));