-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Dont hide output from browsersync command #38
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO what we should do is pipe it to grep to get rid of the confusing output but keep the update notifications. IIRC this was introduced in #31 and it was introduced because people were confused by the info given about the port (telling people to hit localhost:3000)
@rfay i have added a grep command to remove those misleading urls |
Looks good to me. |
Can be tested with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't seem to work as expected, still shows the bogus URLs:
$ ddev browsersync
[Browsersync] Proxying: http://localhost
[Browsersync] Access URLs:
------------------------------------
Local: http://localhost:3000
External: http://d9.example.com:3000
------------------------------------
[Browsersync] Watching files...
Also, I note that the README still says
NOTE: The browsersync'd URL is HTTPS, not HTTP. ddev-router redirects traffic to HTTPS, but browsersync does not know this.
@rfay I'm not seeing that. $ ddev browsersync
Proxying browsersync on https://browsersync-demo.ddev.site:3000
[Browsersync] Proxying: http://localhost
[Browsersync] Watching files... When I remove the $ ddev browsersync
Proxying browsersync on https://browsersync-demo.ddev.site:3000
[Browsersync] Proxying: http://localhost
[Browsersync] Access URLs:
------------------------------------------------
Local: http://localhost:3000
External: http://browsersync-demo.ddev.site:3000
------------------------------------------------
[Browsersync] Watching files... |
My complete
ddev browsersync
Proxying browsersync on https://browsersync-demo.ddev.site:3000 TESTING
[Browsersync] Proxying: http://localhost
[Browsersync] Watching files... DDEV: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had an old browsersync global command that didn't have #ddev-generated
in it, so didn't get overwritten properly on ddev get
.
Now I see the expected results:
$ ddev browsersync
Proxying browsersync on https://d9.example.com:3000
[Browsersync] Proxying: http://localhost
[Browsersync] Watching files...
[Browsersync] Reloading Browsers...
[Browsersync] File event [change] : web/core/profiles/demo_umami/themes/umami/css/base.css
I kind of wonder if this custom command should be installed at the project level, and I'll take a look and see if the ddev get
warned me that it was skipping it.
It did in fact warn me, but I wasn't looking, like most people wouldn't be.
|
Also a good point, i was wondering about this too already. The globally installed command shows up in other ddev projects where the browser-sync addon is not installed. But it does not work there of course. |
Thanks for the fast review and merging. |
Hope to get around to making a PR to move it to a project-level command. |
@mmunz Thanks for contributing! |
Is there any reason not to show the output from browser-sync?
This makes it more difficult to debug, e.g. see when files are reloaded.