-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
64 lines (55 loc) · 1.52 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
63
64
"use strict";
var gulp = require('gulp'),
postcss = require('gulp-postcss'),
sourcemaps = require('gulp-sourcemaps'),
autoprefixer = require('autoprefixer'),
cssnano = require('cssnano'),
postcssnested = require('postcss-nested'),
cssmqpacker = require('css-mqpacker'),
csscomb = require('gulp-csscomb'),
lost = require('lost'),
watch = require('gulp-watch'),
reporter = require("postcss-reporter");
/*************************************************/
gulp.task('postcss', function () {
var processors = [
autoprefixer({browsers: ['last 2 version']}),
postcssnested(),
cssmqpacker(),
csscomb()
];
return gulp
.src('./src/styles.css')
.pipe(postcss(processors))
.pipe(gulp.dest('./dist'));
});
gulp.task('autoprefixer', function() {
return gulp
.src('./src/styles.css')
.pipe(postcss([ autoprefixer({ browsers: ['last 2 versions'] }) ]))
.pipe(gulp.dest('./dist'));
});
gulp.task('cssnano', function() {
return gulp
.src('./src/styles.css')
.pipe(postcss([ cssnano() ]))
.pipe(gulp.dest('./dist'));
});
gulp.task('csscomb', function () {
return gulp
.src('./src/styles.css')
.pipe(csscomb())
.pipe(gulp.dest('./dist'));
});
gulp.task('lost', function() {
return gulp
.src('./src/form.css')
.pipe(postcss([ lost() ]))
.pipe(gulp.dest('./dist'));
});
gulp.task('watch', function () {
// Endless stream mode
return watch('src/form.css')
.pipe(gulp.dest('dist'));
});
gulp.task('default', ['watch','lost']);