Answer the question
In order to leave comments, you need to log in
Browser-sync with php is it wrong?
Already exhausted. The second day I can not cope with these infernal tools. Help me please.
I want to make a website using php and have browser-sync work. Yes, the Internet is full of all sorts of posts about this, but there are preprocessors everywhere and all that. I would just like browser-sync to update a regular php page with regular css and js. Do not need anything else. I myself tried probably 20 times to write and rewrite what is said in these manuals, it did not work out. Please write who can gulpfile.js with a focus on the teapot itself of teapots. There is an open server, but there is a site in the root folder, without any app, etc.
Answer the question
In order to leave comments, you need to log in
// include gulp
var gulp = require('gulp');
var browserSync = require('browser-sync').create();
var localhost = 'site.loc'; // изменить на свой хост
// browser-sync task and settings
gulp.task('browserSync', function(){
browserSync.init({
open: 'external',
host: localhost,
proxy: localhost,
port: 8080
});
});
// start watchers
gulp.task('watch', ['browserSync'], function(){
gulp.watch('**/*.*', browserSync.reload);
});
gulp watch
.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question