Skip to content

Gulp only refreshes once on PHP file update, not at all on CSS changes #4

@sittingpilgrim

Description

@sittingpilgrim

Working in a WAMP environment (Windows 10, PHP 7.1, Node v8.11.3, Gulp v2.0.1); running the fictional university lesson, section 7; the setup worked fine, but after the automatic reload after a PHP worked only once. Fixed this by added a done(); command after reload:
gulp.watch('./**/*.php', function() { browserSync.reload(); done(); });
See https://stackoverflow.com/questions/29801070/gulp-browser-sync-only-works-once
To fix the CSS I added a semi-colon after the cb() command in the waitforscripts task:
gulp.task('waitForScripts', gulp.series('scripts', function(cb) { browserSync.reload(); cb(); }))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions