forked from curioswati-zz/wye
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
32 lines (28 loc) · 806 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
'use strict';
var gulp = require('gulp');
var sass = require('gulp-sass');
var minifycss = require('gulp-minify-css');
var autoprefixer = require('gulp-autoprefixer');
var sourcemaps = require('gulp-sourcemaps');
var paths = {
sass: 'wye/static/sass/**/*.scss',
css: 'wye/static/css'
};
gulp.task('css', function() {
return gulp.src(paths.sass)
.pipe(sourcemaps.init())
.pipe(sass()
.on('error', sass.logError))
.pipe(autoprefixer({
browsers: ['> 1%']
}))
.pipe(minifycss({
debug: true
}))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest(paths.css));
});
gulp.task('watch', function() {
gulp.watch(paths.sass, ['css']);
});
gulp.task('default', ['watch']);