OLD | NEW |
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 pub.command; | 5 library pub.command; |
6 | 6 |
7 import 'dart:io'; | 7 import 'dart:io'; |
8 import 'dart:async'; | 8 import 'dart:async'; |
9 | 9 |
10 import 'package:args/args.dart'; | 10 import 'package:args/args.dart'; |
11 import 'package:path/path.dart' as path; | 11 import 'package:path/path.dart' as path; |
12 | 12 |
13 import 'command/cache.dart'; | 13 import 'command/cache.dart'; |
14 import 'command/deploy.dart'; | 14 import 'command/deploy.dart'; |
15 import 'command/help.dart'; | 15 import 'command/help.dart'; |
16 import 'command/install.dart'; | 16 import 'command/install.dart'; |
17 import 'command/lish.dart'; | 17 import 'command/lish.dart'; |
| 18 import 'command/serve.dart'; |
18 import 'command/update.dart'; | 19 import 'command/update.dart'; |
19 import 'command/uploader.dart'; | 20 import 'command/uploader.dart'; |
20 import 'command/version.dart'; | 21 import 'command/version.dart'; |
21 import 'entrypoint.dart'; | 22 import 'entrypoint.dart'; |
22 import 'exit_codes.dart' as exit_codes; | 23 import 'exit_codes.dart' as exit_codes; |
23 import 'http.dart'; | 24 import 'http.dart'; |
24 import 'log.dart' as log; | 25 import 'log.dart' as log; |
25 import 'package.dart'; | 26 import 'package.dart'; |
26 import 'system_cache.dart'; | 27 import 'system_cache.dart'; |
27 import 'utils.dart'; | 28 import 'utils.dart'; |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 } | 187 } |
187 } | 188 } |
188 | 189 |
189 _initCommands() { | 190 _initCommands() { |
190 var commands = { | 191 var commands = { |
191 'cache': new CacheCommand(), | 192 'cache': new CacheCommand(), |
192 'deploy': new DeployCommand(), | 193 'deploy': new DeployCommand(), |
193 'help': new HelpCommand(), | 194 'help': new HelpCommand(), |
194 'install': new InstallCommand(), | 195 'install': new InstallCommand(), |
195 'publish': new LishCommand(), | 196 'publish': new LishCommand(), |
| 197 'serve': new ServeCommand(), |
196 'update': new UpdateCommand(), | 198 'update': new UpdateCommand(), |
197 'uploader': new UploaderCommand(), | 199 'uploader': new UploaderCommand(), |
198 'version': new VersionCommand() | 200 'version': new VersionCommand() |
199 }; | 201 }; |
200 | 202 |
201 for (var command in commands.values.toList()) { | 203 for (var command in commands.values.toList()) { |
202 for (var alias in command.aliases) { | 204 for (var alias in command.aliases) { |
203 commands[alias] = command; | 205 commands[alias] = command; |
204 } | 206 } |
205 } | 207 } |
206 | 208 |
207 return commands; | 209 return commands; |
208 } | 210 } |
OLD | NEW |