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

Side by Side Diff: lib/src/options.dart

Issue 1412613006: Add -f as an alias for --force-compile. (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 5 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
« CHANGELOG.md ('K') | « CHANGELOG.md ('k') | no next file » | 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 /// Set of flags and options passed to the compiler 5 /// Set of flags and options passed to the compiler
6 library dev_compiler.src.options; 6 library dev_compiler.src.options;
7 7
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 import 'package:args/args.dart'; 10 import 'package:args/args.dart';
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 help: 'Host name or address to serve files from, e.g. --host=0.0.0.0\n' 306 help: 'Host name or address to serve files from, e.g. --host=0.0.0.0\n'
307 'to listen on all interfaces (used only when --serve is on)', 307 'to listen on all interfaces (used only when --serve is on)',
308 defaultsTo: 'localhost') 308 defaultsTo: 'localhost')
309 ..addOption('port', 309 ..addOption('port',
310 help: 'Port to serve files from (used only when --serve is on)', 310 help: 'Port to serve files from (used only when --serve is on)',
311 defaultsTo: '8080') 311 defaultsTo: '8080')
312 ..addFlag('closure', 312 ..addFlag('closure',
313 help: 'Emit Closure Compiler-friendly code (experimental)', 313 help: 'Emit Closure Compiler-friendly code (experimental)',
314 defaultsTo: _CLOSURE_DEFAULT) 314 defaultsTo: _CLOSURE_DEFAULT)
315 ..addFlag('force-compile', 315 ..addFlag('force-compile',
316 help: 'Compile code with static errors', defaultsTo: false) 316 abbr: 'f', help: 'Compile code with static errors', defaultsTo: false)
317 ..addOption('log', abbr: 'l', help: 'Logging level (defaults to warning)') 317 ..addOption('log', abbr: 'l', help: 'Logging level (defaults to warning)')
318 ..addFlag('dump-info', 318 ..addFlag('dump-info',
319 abbr: 'i', help: 'Dump summary information', defaultsTo: null) 319 abbr: 'i', help: 'Dump summary information', defaultsTo: null)
320 ..addFlag('html-report', 320 ..addFlag('html-report',
321 help: 'Output compilation results to html', defaultsTo: null) 321 help: 'Output compilation results to html', defaultsTo: null)
322 ..addOption('v8-binary', 322 ..addOption('v8-binary',
323 help: 'V8-based binary to run JavaScript output with (iojs, node, d8)', 323 help: 'V8-based binary to run JavaScript output with (iojs, node, d8)',
324 defaultsTo: 'iojs') 324 defaultsTo: 'iojs')
325 ..addOption('dump-info-file', 325 ..addOption('dump-info-file',
326 abbr: 'f', 326 help: 'Dump info json file (requires dump-info)', defaultsTo: null);
327 help: 'Dump info json file (requires dump-info)',
328 defaultsTo: null);
329 327
330 // TODO: Switch over to the `pub_cache` package (or the Resource API)? 328 // TODO: Switch over to the `pub_cache` package (or the Resource API)?
331 329
332 /// Tries to find the `lib/runtime/` directory of the dev_compiler package. This 330 /// Tries to find the `lib/runtime/` directory of the dev_compiler package. This
333 /// works when running devc from it's sources or from a snapshot that is 331 /// works when running devc from it's sources or from a snapshot that is
334 /// activated via `pub global activate`. 332 /// activated via `pub global activate`.
335 String _computeRuntimeDir() { 333 String _computeRuntimeDir() {
336 var scriptPath = path.fromUri(Platform.script); 334 var scriptPath = path.fromUri(Platform.script);
337 var file = path.basename(scriptPath); 335 var file = path.basename(scriptPath);
338 var dir = path.dirname(scriptPath); 336 var dir = path.dirname(scriptPath);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 // The pub-cache directory is two levels up, but we verify that the layout 374 // The pub-cache directory is two levels up, but we verify that the layout
377 // looks correct. 375 // looks correct.
378 if (path.basename(dir) != 'dev_compiler') return null; 376 if (path.basename(dir) != 'dev_compiler') return null;
379 dir = path.dirname(dir); 377 dir = path.dirname(dir);
380 if (path.basename(dir) != 'global_packages') return null; 378 if (path.basename(dir) != 'global_packages') return null;
381 dir = path.dirname(dir); 379 dir = path.dirname(dir);
382 return path.join(dir, cacheDir, 'lib', 'runtime'); 380 return path.join(dir, cacheDir, 'lib', 'runtime');
383 } 381 }
384 return null; 382 return null;
385 } 383 }
OLDNEW
« CHANGELOG.md ('K') | « CHANGELOG.md ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698