forked from influxdata/docs.influxdata.com-ARCHIVE
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
31 lines (29 loc) · 842 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
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() {
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())
});
gulp.task('watch', function () {
livereload.listen();
gulp.watch('styles/*.less', ['less']);
});