Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(11)

Unified Diff: sdk/lib/_internal/pub/lib/src/command/global_run.dart

Issue 550643003: Add a --mode flag to pub run and pub global run. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sdk/lib/_internal/pub/lib/src/command/run.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/lib/src/command/global_run.dart
diff --git a/sdk/lib/_internal/pub/lib/src/command/global_run.dart b/sdk/lib/_internal/pub/lib/src/command/global_run.dart
index ae47a052e9ecc240598266ef6f463f7ac15d96b6..06783e5103db7cb129acaa5122b734d8988fe8a7 100644
--- a/sdk/lib/_internal/pub/lib/src/command/global_run.dart
+++ b/sdk/lib/_internal/pub/lib/src/command/global_run.dart
@@ -6,6 +6,7 @@ library pub.command.global_run;
import 'dart:async';
+import 'package:barback/barback.dart';
import 'package:path/path.dart' as p;
import '../command.dart';
@@ -21,6 +22,14 @@ class GlobalRunCommand extends PubCommand {
"NOTE: We are currently optimizing this command's startup time.";
String get usage => "pub global run <package>:<executable> [args...]";
+ /// The mode for barback transformers.
+ BarbackMode get mode => new BarbackMode(commandOptions["mode"]);
+
+ GlobalRunCommand() {
+ commandParser.addOption("mode", defaultsTo: "release",
+ help: 'Mode to run transformers in.');
+ }
+
Future onRun() async {
if (commandOptions.rest.isEmpty) {
usageError("Must specify an executable to run.");
@@ -45,7 +54,8 @@ class GlobalRunCommand extends PubCommand {
'package.');
}
- var exitCode = await globals.runExecutable(package, executable, args);
+ var exitCode = await globals.runExecutable(package, executable, args,
+ mode: mode);
await flushThenExit(exitCode);
}
}
« no previous file with comments | « no previous file | sdk/lib/_internal/pub/lib/src/command/run.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698