-
Notifications
You must be signed in to change notification settings - Fork 4
/
gulpfile.js
37 lines (32 loc) · 939 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
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
var browserSync = require("browser-sync");
gulp.task('test', function() {
gulp.src('./wisteria.css')
.pipe($.csslint('.csslintrc'))
.pipe($.csslint.reporter())
.pipe($.csslint.failReporter());
});
gulp.task('report', function () {
gulp.src('./wisteria.css')
.pipe($.stylestats());
});
gulp.task('browser-sync', function() {
browserSync({
server: { baseDir: "./docs/" }
});
});
gulp.task('build', function() {
gulp.src('./wisteria.css')
.pipe($.csslint('.csslintrc'))
.pipe($.csslint.reporter())
.pipe($.csscomb())
.pipe(gulp.dest('./'))
.pipe(gulp.dest('./docs/css/'))
.pipe($.rename({suffix: '.min'}))
.pipe($.csso())
.pipe(gulp.dest('./'));
});
gulp.task('default', ['browser-sync'], function() {
gulp.watch(['wisteria.css', '*/**/custom.css', '*/**/index.html'], ['build', browserSync.reload]);
});