| 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.barback; | 5 library pub.barback; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:barback/barback.dart'; | 9 import 'package:barback/barback.dart'; |
| 10 import 'package:path/path.dart' as path; | 10 import 'package:path/path.dart' as path; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 /// | 24 /// |
| 25 /// This includes a string literal of Dart code ([_TRANSFORMER_ISOLATE] in | 25 /// This includes a string literal of Dart code ([_TRANSFORMER_ISOLATE] in |
| 26 /// load_transformers.dart). That code imports "package:barback/barback.dart". | 26 /// load_transformers.dart). That code imports "package:barback/barback.dart". |
| 27 /// This string is included in the SDK, but that import is resolved using the | 27 /// This string is included in the SDK, but that import is resolved using the |
| 28 /// application’s version of Barback. That means it must tightly control which | 28 /// application’s version of Barback. That means it must tightly control which |
| 29 /// version of Barback the application is using so that it's one that pub | 29 /// version of Barback the application is using so that it's one that pub |
| 30 /// supports. | 30 /// supports. |
| 31 /// | 31 /// |
| 32 /// Whenever a new non-patch version of barback is published, this *must* be | 32 /// Whenever a new non-patch version of barback is published, this *must* be |
| 33 /// incremented to synchronize with that. | 33 /// incremented to synchronize with that. |
| 34 final supportedVersions = new VersionConstraint.parse(">=0.11.0 <0.13.0"); | 34 final supportedVersions = new VersionConstraint.parse(">=0.13.0-dev <0.14.0"); |
| 35 | 35 |
| 36 /// A list of the names of all built-in transformers that pub exposes. | 36 /// A list of the names of all built-in transformers that pub exposes. |
| 37 const _BUILT_IN_TRANSFORMERS = const ['\$dart2js']; | 37 const _BUILT_IN_TRANSFORMERS = const ['\$dart2js']; |
| 38 | 38 |
| 39 /// An identifier for a transformer and the configuration that will be passed to | 39 /// An identifier for a transformer and the configuration that will be passed to |
| 40 /// it. | 40 /// it. |
| 41 /// | 41 /// |
| 42 /// It's possible that the library identified by [this] defines multiple | 42 /// It's possible that the library identified by [this] defines multiple |
| 43 /// transformers. If so, [configuration] will be passed to all of them. | 43 /// transformers. If so, [configuration] will be passed to all of them. |
| 44 class TransformerId { | 44 class TransformerId { |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 if (parts.length <= index + 1) { | 244 if (parts.length <= index + 1) { |
| 245 throw new FormatException( | 245 throw new FormatException( |
| 246 'Invalid URL path "${url.path}". Expected package name ' | 246 'Invalid URL path "${url.path}". Expected package name ' |
| 247 'after "packages".'); | 247 'after "packages".'); |
| 248 } | 248 } |
| 249 | 249 |
| 250 var package = parts[index + 1]; | 250 var package = parts[index + 1]; |
| 251 var assetPath = path.url.join("lib", path.url.joinAll(parts.skip(index + 2))); | 251 var assetPath = path.url.join("lib", path.url.joinAll(parts.skip(index + 2))); |
| 252 return new AssetId(package, assetPath); | 252 return new AssetId(package, assetPath); |
| 253 } | 253 } |
| OLD | NEW |