Skip to content
This repository has been archived by the owner on Feb 7, 2023. It is now read-only.

Watcher doesn't update browser display #25

Open
KatieMFritz opened this issue Mar 12, 2017 · 4 comments
Open

Watcher doesn't update browser display #25

KatieMFritz opened this issue Mar 12, 2017 · 4 comments

Comments

@KatieMFritz
Copy link

KatieMFritz commented Mar 12, 2017

Background:

  • I got super excited reading Atomic Design and listening to the style guide podcast, so I installed the pre-built Twig standard version today on Windows 10. ✨
  • I'm using Wampserver64 to serve the project. I've been using wamp successfully for other PHP projects for a while. However, I'm not familiar with PHP CLI.
  • I first tried php core/console --serve in a Git Bash terminal and everything looked good in the terminal, but when I go to localhost:8080 there's a "connection refused" error.
  • With wamp I can access the site at http://localhost/pattern-lab/public.
  • My system PHP version is PHP 5.6.19 (cli) (built: Mar 2 2016 20:09:42).
  • php core/console --generate seems to work perfectly.

Problem:

When I type php core/console --watch in the terminal, it looks good:

$ php core/console --watch
configuring pattern lab...
spawning the watch process...

But then nothing else happens, either in the terminal or in the browser, when I update and save files. I have to run --generate again to see my changes in the browser.

Possibly related to #pattern-lab/patternlab-php#371 and/or #21?

I realize there might be something deeper going on, since I ran into problems with --server too. DevOps gets me every time. 🙄

Any tips? Thanks! 😄

@bradfrost
Copy link
Member

Hey @KatieMFritz,
I wish I could be of more help, but everything seems like it's set up properly.

Another option could be using a tool like Grunt/Gulp to listen for changes. Here's how I've done it in the past: http://bradfrost.com/blog/post/using-grunt-with-pattern-lab/ (Note you'd have to change the Pattern Lab build command to php core/console -gp to match the PL 2.0 version of doing things). This way, Grunt or Gulp would listen for changes to files in source and would bounce them over to public.

@lrobeson
Copy link

-p doesn't seem to be an option for me, when I try it I get this response:

Pattern Lab Console Options

Usage:

php core/console command [options]

Available commands:

--config       Configure Pattern Lab
--export       Export Pattern Lab patterns & assets
--generate     Generate Pattern Lab
--help         Print the help for a given command
--server       Start the PHP-based server
--starterkit   Initialize or fetch a specific StarterKit
--version      Print the version number
--watch        Watch for changes and regenerate

@KatieMFritz
Copy link
Author

Thanks, @bradfrost. I'm still getting comfortable with build tools, so I'll revisit this after I figure out what I'm doing with Grunt or Gulp. 😄

@rgracia
Copy link

rgracia commented Nov 21, 2017

I have the same issue. Watch does nothing when editing SASS partials. No css compiling is taking place. --generate only generates twig and js changes but no CSS.

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

No branches or pull requests

4 participants