Skip to content
New issue

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

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

Already on GitHub? # to your account

package.json: remove option '--open' from script 'dev' #864

Closed
wants to merge 2 commits into from

Conversation

eine
Copy link

@eine eine commented Jan 3, 2020

When yarn dev is executed inside a docker container, --open requires a browser to be installed and an X11 server to be shared. Instead, it is more idiomatic to just bind a port and remove the option.

Developers that want to execute the script on the host and have the browser opened automatically, can still do so: yarn dev --open.

In fact, the command inside the container needs to be yarn dev --host 0.0.0.0. Therefore, an alternative solution would be to keep script dev and add another one (say dev-docker).

@davidfischer
Copy link
Contributor

I'm fine with this solution overall. I don't love that the browser opens to an error screen before the docs are built. I'm open to any better solution.

@eine eine requested a review from agjohnson January 15, 2020 03:34
@agjohnson
Copy link
Collaborator

What's the use case for doing development without access to X11 or a browser?

@eine
Copy link
Author

eine commented Jan 23, 2020

@agjohnson, this request is to allow development with access to X11 or a browser that are not installed in the same environment/context/box/container/VM as node/yarn. As commented above, I run yarn dev --host 0.0.0.0 inside a docker container and just use the browser on the host.

The current command (with --open) requires me to install an additional browser and to share an X11 server with the container. However, that should not be a requirement.

@eine
Copy link
Author

eine commented Apr 16, 2020

ping @agjohnson @davidfischer

@agjohnson
Copy link
Collaborator

I'm fine with dropping --open. We won't official support the workflow you are describing, but I don't think the open flag was important either way. I have a PR that makes more changes to the development server in #908, which addresses some of the issues with the webpack build flow, though the open call still seems to have sometimes before test docs are built.

Copy link
Collaborator

@agjohnson agjohnson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍. Will wait on a few PRs to merge before bringing this in

@agjohnson agjohnson added this to the 0.5 milestone May 2, 2020
@eine eine closed this May 5, 2020
@eine eine deleted the fix-devscript branch May 5, 2020 19:11
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants