Answer the question
In order to leave comments, you need to log in
How to set up gulp-livereload so that changes are tracked not by localhost:8080, but by site.com?
How to set up gulp-livereload so that changes are tracked not by localhost:8080, but by site.com?
var gulp = require('gulp'),
livereload = require('gulp-livereload'),
connect = require('gulp-connect'),
autoprefixer = require('gulp-autoprefixer');
gulp.task('connect', function() {
connect.server({
root: '',
livereload: true
});
});
gulp.task('css', function() {
gulp.src('css/*.css')
.pipe(autoprefixer('last 15 versions'))
.pipe(connect.reload());
});
gulp.task('html', function () {
gulp.src('*.html')
.pipe(connect.reload());
});
gulp.task('watch', function() {
gulp.watch('css/*.css', ['css'])
gulp.watch('*.html', ['html'])
});
gulp.task('default', ['connect', 'html', 'css', 'watch']);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question