| Index: sdk/lib/_internal/pub/lib/src/command/serve.dart
|
| diff --git a/sdk/lib/_internal/pub/lib/src/command/serve.dart b/sdk/lib/_internal/pub/lib/src/command/serve.dart
|
| index bf2c5715268b109202f702e7197a8bfeff72d085..12558c6b662978054ef6446b656154ec2d665ae0 100644
|
| --- a/sdk/lib/_internal/pub/lib/src/command/serve.dart
|
| +++ b/sdk/lib/_internal/pub/lib/src/command/serve.dart
|
| @@ -31,6 +31,9 @@ class ServeCommand extends PubCommand {
|
| /// `true` if Dart entrypoints should be compiled to JavaScript.
|
| bool get useDart2JS => commandOptions['dart2js'];
|
|
|
| + /// `true` if generated JavaScript should be minified.
|
| + bool get minify => commandOptions['minify'];
|
| +
|
| ServeCommand() {
|
| commandParser.addOption('port', defaultsTo: '8080',
|
| help: 'The port to listen on.');
|
| @@ -45,6 +48,9 @@ class ServeCommand extends PubCommand {
|
|
|
| commandParser.addFlag('dart2js', defaultsTo: true,
|
| help: 'Compile Dart to JavaScript.');
|
| +
|
| + commandParser.addFlag('minify', defaultsTo: false,
|
| + help: 'Minify generated JavaScript.');
|
| }
|
|
|
| Future onRun() {
|
| @@ -64,7 +70,7 @@ class ServeCommand extends PubCommand {
|
| var builtInTransformers = null;
|
| if (useDart2JS) {
|
| builtInTransformers = [
|
| - new Dart2JSTransformer(graph),
|
| + new Dart2JSTransformer(graph, minify: minify),
|
| new DartForwardingTransformer()
|
| ];
|
| }
|
|
|