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

Add basic web device and run support #28302

Merged
merged 10 commits into from
Feb 27, 2019

Conversation

jonahwilliams
Copy link
Member

Description

Adds a skeleton web device, web specific project, and support for run via --release --no-hot. This device exists behind the FLUTTER_WEB env variable to prevent breaking default flutter run until we decide on the UX there. Added ability to launch chrome on mac.

Related Issues

Fixes #28288
Fixes #28287
Part of #28285

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • My PR includes tests for all changed/updated/fixed behaviors (See [Test Coverage]).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I signed the [CLA].
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require Flutter developers to manually update their apps to accommodate your change?

  • Yes, this is a breaking change (Please read [Handling breaking changes]).
  • No, this is not a breaking change.

@zoechi zoechi added the tool Affects the "flutter" command-line tool. See also t: labels. label Feb 22, 2019
@jonahwilliams
Copy link
Member Author

For windows, I believe the command is as simple as start chrome.exe - but this is really just a placeholder for now.

@jonahwilliams
Copy link
Member Author

friendly ping @yjbanov

Copy link
Contributor

@yjbanov yjbanov left a comment

Choose a reason for hiding this comment

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

lgtm

packages/flutter_tools/lib/src/web/web_device.dart Outdated Show resolved Hide resolved

Future<void> ensureReadyForPlatformSpecificTooling() async {
/// Generate index.html in build/web. Eventually we could support
/// a custom html under the web sub directory.
Copy link
Contributor

Choose a reason for hiding this comment

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

FWIW internally we already switched to hand-written index.html. We consider it equivalent of Java/ObjC code generated by flutter create then edited by hand.

Copy link
Member Author

Choose a reason for hiding this comment

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

Makes sense, we can generate the index.html only as a part of flutter create and then separate out the generatedPluginRegistry files.

@jonahwilliams jonahwilliams merged commit 6f5f037 into flutter:master Feb 27, 2019
@jonahwilliams jonahwilliams deleted the add_web_device branch February 27, 2019 00:58
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add web device and support run --web. Support for minimal static asset serving from the build/ directory
4 participants