| 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 #library('pub_source'); | 5 #library('source'); |
| 6 | 6 |
| 7 #import('io.dart'); | 7 #import('package.dart'); |
| 8 #import('pub.dart'); | |
| 9 #import('utils.dart'); | |
| 10 | |
| 11 #source('git_source.dart'); | |
| 12 #source('sdk_source.dart'); | |
| 13 #source('source_registry.dart'); | |
| 14 | 8 |
| 15 /** | 9 /** |
| 16 * A source from which to install packages. | 10 * A source from which to install packages. |
| 17 * | 11 * |
| 18 * Each source has many packages that it looks up using [PackageId]s. The source | 12 * Each source has many packages that it looks up using [PackageId]s. The source |
| 19 * is responsible for installing these packages to the package cache. | 13 * is responsible for installing these packages to the package cache. |
| 20 */ | 14 */ |
| 21 class Source { | 15 class Source { |
| 22 /** | 16 /** |
| 23 * The name of the source. Should be lower-case, suitable for use in a | 17 * The name of the source. Should be lower-case, suitable for use in a |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 /** | 56 /** |
| 63 * Returns a human-friendly name for the package identified by [id]. This | 57 * Returns a human-friendly name for the package identified by [id]. This |
| 64 * method should be light-weight. It doesn't need to validate that the given | 58 * method should be light-weight. It doesn't need to validate that the given |
| 65 * package exists. | 59 * package exists. |
| 66 * | 60 * |
| 67 * The package name should be lower-case and suitable for use in a filename. | 61 * The package name should be lower-case and suitable for use in a filename. |
| 68 * It may contain forward slashes. | 62 * It may contain forward slashes. |
| 69 */ | 63 */ |
| 70 String packageName(PackageId id) => id.description; | 64 String packageName(PackageId id) => id.description; |
| 71 } | 65 } |
| OLD | NEW |