| // Copyright 2019 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| import '../build_info.dart'; |
| import '../project.dart'; |
| import '../runner/flutter_command.dart' |
| show DevelopmentArtifact, FlutterCommandResult; |
| import '../web/compile.dart'; |
| class BuildWebCommand extends BuildSubCommand { |
| Future<Set<DevelopmentArtifact>> get requiredArtifacts async => |
| const <DevelopmentArtifact>{ |
| DevelopmentArtifact.universal, |
| final String name = 'web'; |
| bool get isExperimental => true; |
| final String description = '(EXPERIMENTAL) build a web application bundle.'; |
| Future<FlutterCommandResult> runCommand() async { |
| final FlutterProject flutterProject = FlutterProject.current(); |
| final String target = argResults['target']; |
| final BuildInfo buildInfo = getBuildInfo(); |
| await buildWeb(flutterProject, target, buildInfo); |