| OLD | NEW | 
|    1 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file |    1 // Copyright (c) 2012, 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 /** |    5 /** | 
|    6  * The main entrypoint for the pub command line application. |    6  * The main entrypoint for the pub command line application. | 
|    7  */ |    7  */ | 
|    8 #library('pub'); |    8 #library('pub'); | 
|    9  |    9  | 
|   10 #import('io.dart'); |   10 #import('io.dart'); | 
 |   11 #import('command_install.dart'); | 
 |   12 #import('command_list.dart'); | 
 |   13 #import('command_update.dart'); | 
 |   14 #import('command_version.dart'); | 
 |   15 #import('entrypoint.dart'); | 
 |   16 #import('git_source.dart'); | 
 |   17 #import('package.dart'); | 
|   11 #import('pubspec.dart'); |   18 #import('pubspec.dart'); | 
 |   19 #import('sdk_source.dart'); | 
|   12 #import('source.dart'); |   20 #import('source.dart'); | 
 |   21 #import('source_registry.dart'); | 
 |   22 #import('system_cache.dart'); | 
|   13 #import('utils.dart'); |   23 #import('utils.dart'); | 
|   14 #import('version.dart'); |   24 #import('version.dart'); | 
|   15  |   25  | 
|   16 #source('command_list.dart'); |  | 
|   17 #source('command_install.dart'); |  | 
|   18 #source('command_update.dart'); |  | 
|   19 #source('command_version.dart'); |  | 
|   20 #source('entrypoint.dart'); |  | 
|   21 #source('package.dart'); |  | 
|   22 #source('system_cache.dart'); |  | 
|   23  |  | 
|   24 Version get pubVersion() => new Version(0, 0, 0); |   26 Version get pubVersion() => new Version(0, 0, 0); | 
|   25  |   27  | 
|   26 main() { |   28 main() { | 
|   27   var args = new Options().arguments; |   29   var args = new Options().arguments; | 
|   28  |   30  | 
|   29   // TODO(rnystrom): In addition to explicit "help" and "version" commands, |   31   // TODO(rnystrom): In addition to explicit "help" and "version" commands, | 
|   30   // should also add special-case support for --help and --version arguments to |   32   // should also add special-case support for --help and --version arguments to | 
|   31   // be consistent with other Unix apps. |   33   // be consistent with other Unix apps. | 
|   32   var commands = { |   34   var commands = { | 
|   33     'list': new ListCommand(), |   35     'list': new ListCommand(), | 
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  170     }).handleException(handleError); |  172     }).handleException(handleError); | 
|  171   } |  173   } | 
|  172  |  174  | 
|  173   /** |  175   /** | 
|  174    * Override this to perform the specific command. Return a future that |  176    * Override this to perform the specific command. Return a future that | 
|  175    * completes when the command is done or fails if the command fails. If the |  177    * completes when the command is done or fails if the command fails. If the | 
|  176    * command is synchronous, it may return `null`. |  178    * command is synchronous, it may return `null`. | 
|  177    */ |  179    */ | 
|  178   abstract Future onRun(); |  180   abstract Future onRun(); | 
|  179 } |  181 } | 
| OLD | NEW |