This repository has been archived by the owner on Aug 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 337
Add the ability to preview without opening the browser #816
Merged
Merged
Changes from 3 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
8e52d3b
Add TODO for preview docs
EverlastingBugstopper 6062adf
Add the ability to preview without opening the browser
EverlastingBugstopper 05f340f
Don't open the browser when testing wrangler preview
EverlastingBugstopper fbdbc7c
Merge branch 'master' into avery/mario-beats-browser
EverlastingBugstopper 9106cf8
Switch from --terminal to --headless
EverlastingBugstopper 2fde3f0
Merge branch 'master' into avery/mario-beats-browser
EverlastingBugstopper 15db829
Merge branch 'master' into avery/mario-beats-browser
EverlastingBugstopper defdb0c
Merge branch 'master' into avery/mario-beats-browser
EverlastingBugstopper File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
the flag is "terminal" but this attribute says browser... might be more maintainable if they are aligned- what do you think?
i sorta think that it might be nice to have the flag be browser instead of terminal... backwards compat has us a bit stuck though. gonna think on this- but would love to hear your thoughts!
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.
My preference would be that the default opens the browser and that the flag is browser. The reason I implemented it this way is because of the way things are today. That being said, I don't think we really need to worry too much about backwards compatibility wrt preview, but I could be wrong. As for the reason the flag is terminal and the preview function takes browser - it makes more sense semantically (to me) to test for
browser == true
than forterminal == false
when trying to open the browser.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.
should it be configurable via another method as well? there's the whole idea that if there's a flag for it, there should be a config setting for it, or that it should accept an environment variable.
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.
also, perhaps it isn't a no arg flag, but a bool value flag, like
--browser=true
, with a default?