Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No file watcher & browser refresh in patternlab:serve gulp task. #957

Closed
ringods opened this issue Oct 2, 2018 · 4 comments
Closed

No file watcher & browser refresh in patternlab:serve gulp task. #957

ringods opened this issue Oct 2, 2018 · 4 comments

Comments

@ringods
Copy link
Contributor

ringods commented Oct 2, 2018

I am using Pattern Lab Node v3.0.0-beta-1 on Mac, with Node v8.12.0, using a Gulp Edition (tested with Gulp v3.9.1 and v4.0.0).

Expected Behavior

When running gulp patternlab:serve, I want the local server to start and the file watcher to pick up changes with the cycle ending in a browser refresh.

Actual Behavior

The local server is started, but any change to my patterns is not picked up and there is no browser refresh. A manual refresh doesn't make a difference.

Steps to Reproduce

Create a new project and install PL 3.0.0-beta-1 with edition-node-gulp (on gulp 3.9.1). Just use the generated gulpfile.js with task patternlab:serve.

@mrkmiller
Copy link

I can confirm that I had the same issue.

@PhilipRowe
Copy link

PhilipRowe commented Oct 24, 2018

I had the same issue as well! I managed to fix this by updating the serve function in the gulpfile.js to:

function serve() {
    return patternlab.server
        .serve({
            cleanPublic: config.cleanPublic,
            watch: true
        })
        .then(() => {
            // do something else when this promise resolves
        });
}

Adding the watch: true is the important part!

@bmuenzenmeyer maybe that should be set in the default gulpfile or it should be set to watch: argv.watch to match the build function.

@karlschwaier
Copy link

karlschwaier commented Jan 17, 2019

Adding watch: true fixes watching patterns, but there is no reload in the browser when I change CSS.

@martymcflysenior
Copy link

I'm seeing the same issue while using edition-twig (php engine) and starterkit-twig-demo. I'm using Pattern Lab Node v3.0.1. Any workarounds available without gulp?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants