-
Notifications
You must be signed in to change notification settings - Fork 2
/
gulpfile.js
53 lines (41 loc) · 923 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
42
43
44
45
46
47
48
49
50
51
52
53
var gulp = require('gulp'),
sass = require('gulp-sass'),
autoprefixer = require('gulp-autoprefixer'),
pump = require('pump'),
rename = require('gulp-rename'),
del = require('del');
require('gulp-release-it')(gulp);
var paths = {
src: './src/*.scss',
dist: './dist/'
};
gulp.task('default', ['compile']);
gulp.task('clean',function(cb){
return del([
paths.dist+"*"
], cb);
});
gulp.task('compile', ['clean'], function(cb){
pump([
gulp.src(paths.src),
sass({
errLogToConsole: true
}),
autoprefixer({
browsers: ['> 1%', 'last 3 versions', 'Firefox ESR'],
cascade: false
}),
gulp.dest(paths.dist),
rename({
suffix: '.min'
}),
sass({
outputStyle: 'compressed',
errLogToConsole: true
}),
gulp.dest(paths.dist)
], cb);
});
gulp.task('watch', function() {
gulp.watch(paths.src, ['compile']);
});