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

Unified Diff: lib/compiler/implementation/dart2js.dart

Issue 10331010: Add support for --no-colors to make it easier to integrate dart2js in the editor. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add bug number. Created 8 years, 8 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 | « lib/compiler/implementation/colors.dart ('k') | lib/compiler/implementation/source_file.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/dart2js.dart
diff --git a/lib/compiler/implementation/dart2js.dart b/lib/compiler/implementation/dart2js.dart
index 807d79c4c46227ddcf697b3d59a5457c8335fac0..87b60e08b6271bce0fd1ca1fd20452c7bd7d3523 100644
--- a/lib/compiler/implementation/dart2js.dart
+++ b/lib/compiler/implementation/dart2js.dart
@@ -9,7 +9,7 @@
#import('dart:utf');
#import('../compiler.dart', prefix: 'api');
-#import('colors.dart');
+#import('colors.dart', prefix: 'colors');
#import('source_file.dart');
#import('filenames.dart');
#import('util/uri_extras.dart');
@@ -44,6 +44,8 @@ void compile(List<String> argv) {
out = cwd.resolve(path);
} else if ('--allow-mock-compilation' == argument) {
options.add(argument);
+ } else if ('--no-colors' == argument) {
+ colors.enabled = false;
} else if (argument.startsWith('-')) {
fail('Unknown option $argument.');
} else {
@@ -75,7 +77,7 @@ void compile(List<String> argv) {
}
void info(var message) {
- if (verbose) print('${green("info:")} $message');
+ if (verbose) print('${colors.green("info:")} $message');
}
void handler(Uri uri, int begin, int end, String message, bool fatal) {
« no previous file with comments | « lib/compiler/implementation/colors.dart ('k') | lib/compiler/implementation/source_file.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698