forked from influxdata/docs.influxdata.com-ARCHIVE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
32 lines (30 loc) · 875 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
var gulp = require('gulp'),
autoprefix = require('gulp-autoprefixer'),
cleanCSS = require('gulp-clean-css'),
less = require('gulp-less'),
livereload = require('gulp-livereload'),
sourcemaps = require('gulp-sourcemaps'),
watch = require('gulp-watch');
gulp.task('less', function(done) {
gulp.src('styles/docs-default.less')
.pipe(sourcemaps.init())
.pipe(less())
.pipe(cleanCSS())
.pipe(autoprefix('last 2 version'))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('static/css/'))
.pipe(livereload())
gulp.src('styles/docs-light.less')
.pipe(sourcemaps.init())
.pipe(less())
.pipe(cleanCSS())
.pipe(autoprefix('last 2 version'))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('static/css/'))
.pipe(livereload())
done()
});
gulp.task('watch', function () {
livereload.listen();
gulp.watch('styles/{*.less,*.css}', gulp.series('less'));
});