vigetlabs / blendid

A delicious blend of gulp tasks combined into a configurable asset pipeline and static site builder
MIT License
4.97k stars 683 forks source link

Watch PHP files? #510

Closed robbymilo closed 6 years ago

robbymilo commented 6 years ago

Is it possible to configure webpack and browsersync to watch and update PHP files?

hjblokland commented 6 years ago

In your config file you can set the ‘files’ option to tell browserSync to watch additional files.

Check the browsersync secrion in the readme file for an example.

nikosolihin commented 6 years ago

But this just refreshes the browser and doesn't seem to execute the tasks defined through additionalTasks unless you terminate and rerun blendid. I ended up defining a watch within initialize():

const phpTask = () => { return gulp.src(globs.php) .pipe(gulp.dest(paths.dest)) } gulp.task('php', php); watch(globs.php, () => php());