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

Side by Side Diff: pkg/csslib/lib/css.dart

Issue 52573002: Remove uses of Options from pkg, samples, tests, and third_party directories. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Edit comment Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/args/lib/args.dart ('k') | pkg/csslib/test/run_all.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library css; 5 library css;
6 6
7 import 'dart:io'; 7 import 'dart:io';
8 8
9 import 'package:path/path.dart' as path; 9 import 'package:path/path.dart' as path;
10 import 'package:source_maps/span.dart' show SourceFile; 10 import 'package:source_maps/span.dart' show SourceFile;
11 11
12 import 'parser.dart'; 12 import 'parser.dart';
13 import 'visitor.dart'; 13 import 'visitor.dart';
14 import 'src/messages.dart'; 14 import 'src/messages.dart';
15 import 'src/options.dart'; 15 import 'src/options.dart';
16 16
17 void main() { 17 void main(List<String> arguments) {
18 // TODO(jmesserly): fix this to return a proper exit code 18 // TODO(jmesserly): fix this to return a proper exit code
19 var options = PreprocessorOptions.parse(new Options().arguments); 19 var options = PreprocessorOptions.parse(arguments);
20 if (options == null) return; 20 if (options == null) return;
21 21
22 messages = new Messages(options: options); 22 messages = new Messages(options: options);
23 23
24 _time('Total time spent on ${options.inputFile}', () { 24 _time('Total time spent on ${options.inputFile}', () {
25 _compile(options.inputFile, options.verbose); 25 _compile(options.inputFile, options.verbose);
26 }, true); 26 }, true);
27 } 27 }
28 28
29 void _compile(String inputPath, bool verbose) { 29 void _compile(String inputPath, bool verbose) {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 void _printMessage(String message, int duration) { 72 void _printMessage(String message, int duration) {
73 var buf = new StringBuffer(); 73 var buf = new StringBuffer();
74 buf.write(message); 74 buf.write(message);
75 for (int i = message.length; i < 60; i++) buf.write(' '); 75 for (int i = message.length; i < 60; i++) buf.write(' ');
76 buf.write(' -- '); 76 buf.write(' -- ');
77 if (duration < 10) buf.write(' '); 77 if (duration < 10) buf.write(' ');
78 if (duration < 100) buf.write(' '); 78 if (duration < 100) buf.write(' ');
79 buf..write(duration)..write(' ms'); 79 buf..write(duration)..write(' ms');
80 print(buf.toString()); 80 print(buf.toString());
81 } 81 }
OLDNEW
« no previous file with comments | « pkg/args/lib/args.dart ('k') | pkg/csslib/test/run_all.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698