OLD | NEW |
1 library pub.package; | 1 library pub.package; |
2 import 'dart:io'; | 2 import 'dart:io'; |
| 3 import 'package:barback/barback.dart'; |
3 import 'package:path/path.dart' as p; | 4 import 'package:path/path.dart' as p; |
4 import 'package:barback/barback.dart'; | 5 import 'package:pub_semver/pub_semver.dart'; |
5 import 'barback/transformer_id.dart'; | 6 import 'barback/transformer_id.dart'; |
6 import 'io.dart'; | 7 import 'io.dart'; |
7 import 'git.dart' as git; | 8 import 'git.dart' as git; |
8 import 'pubspec.dart'; | 9 import 'pubspec.dart'; |
9 import 'source_registry.dart'; | 10 import 'source_registry.dart'; |
10 import 'utils.dart'; | 11 import 'utils.dart'; |
11 import 'version.dart'; | |
12 final _README_REGEXP = new RegExp(r"^README($|\.)", caseSensitive: false); | 12 final _README_REGEXP = new RegExp(r"^README($|\.)", caseSensitive: false); |
13 class Package { | 13 class Package { |
14 static int orderByNameAndVersion(Package a, Package b) { | 14 static int orderByNameAndVersion(Package a, Package b) { |
15 var name = a.name.compareTo(b.name); | 15 var name = a.name.compareTo(b.name); |
16 if (name != 0) return name; | 16 if (name != 0) return name; |
17 return a.version.compareTo(b.version); | 17 return a.version.compareTo(b.version); |
18 } | 18 } |
19 final String dir; | 19 final String dir; |
20 String get name { | 20 String get name { |
21 if (pubspec.name != null) return pubspec.name; | 21 if (pubspec.name != null) return pubspec.name; |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 return "$name $constraint from $source ($description)"; | 186 return "$name $constraint from $source ($description)"; |
187 } | 187 } |
188 int get hashCode => name.hashCode ^ source.hashCode; | 188 int get hashCode => name.hashCode ^ source.hashCode; |
189 bool operator ==(other) { | 189 bool operator ==(other) { |
190 return other is PackageDep && | 190 return other is PackageDep && |
191 other.name == name && | 191 other.name == name && |
192 other.source == source && | 192 other.source == source && |
193 other.constraint == constraint; | 193 other.constraint == constraint; |
194 } | 194 } |
195 } | 195 } |
OLD | NEW |