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

Side by Side Diff: mojo/public/dart/mojom/lib/src/command_runner.dart

Issue 1441033002: Move mojo and mojom from mojo/public/dart to mojo/dart/packages (Closed) Base URL: git@github.com:domokit/mojo.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
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 library mojom.command_runner;
6
7 import 'dart:async';
8 import 'dart:io';
9
10 import 'package:args/args.dart';
11 import 'package:args/command_runner.dart';
12 import 'package:mojom/src/commands/check.dart';
13 import 'package:mojom/src/commands/gen.dart';
14 import 'package:mojom/src/commands/single.dart';
15
16 class MojomCommandRunner extends CommandRunner {
17 MojomCommandRunner()
18 : super("mojom", "mojom is a tool for managing Mojo bindings for Dart.") {
19 super.argParser.addFlag('dry-run',
20 abbr: 'd',
21 defaultsTo: false,
22 negatable: false,
23 help: 'Print the operations that would have been run, but'
24 'do not run anything.');
25 super.argParser.addFlag('ignore-duplicates',
26 abbr: 'i',
27 defaultsTo: false,
28 negatable: false,
29 help: 'Ignore generation of a .mojom.dart file into the same location '
30 'as an existing file. By default this is an error');
31 super.argParser.addOption('mojom-root',
32 abbr: 'r',
33 defaultsTo: Directory.current.path,
34 help: 'Directory from which to begin the search for .mojom files if '
35 'needed.');
36 super.argParser.addOption('mojo-sdk',
37 abbr: 'm',
38 defaultsTo: Platform.environment['MOJO_SDK'],
39 help: 'Path to the Mojo SDK, which can also be specified '
40 'with the environment variable MOJO_SDK.');
41 super.argParser.addOption('skip',
42 abbr: 's', allowMultiple: true, help: 'Directories to skip.');
43 super.argParser.addFlag('verbose',
44 abbr: 'v',
45 defaultsTo: false,
46 negatable: false,
47 help: 'Show extra output about what mojom is doing.');
48
49 super.addCommand(new CheckCommand());
50 super.addCommand(new SinglePackageCommand());
51 super.addCommand(new GenCommand());
52 }
53 }
OLDNEW
« no previous file with comments | « mojo/public/dart/mojom/lib/README.md ('k') | mojo/public/dart/mojom/lib/src/commands/check.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698