Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Unified Diff: pkg/polymer/lib/src/build/build_filter.dart

Issue 223553008: Only pass an AssetId to isPrimary and declareOutputs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix script_compactor Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/observe/pubspec.yaml ('k') | pkg/polymer/lib/src/build/import_inliner.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/lib/src/build/build_filter.dart
diff --git a/pkg/polymer/lib/src/build/build_filter.dart b/pkg/polymer/lib/src/build/build_filter.dart
index fc2138d72e654eb485e0deafe7b9d20850b8dd34..4b50fe1caf86e83941a2fb619e88046ba675c586 100644
--- a/pkg/polymer/lib/src/build/build_filter.dart
+++ b/pkg/polymer/lib/src/build/build_filter.dart
@@ -17,16 +17,21 @@ class BuildFilter extends Transformer with PolymerTransformer {
final TransformOptions options;
BuildFilter(this.options);
- Future<bool> isPrimary(Asset input) => new Future.value(
+ // TODO(nweiz): This should just take an AssetId when barback <0.13.0 support
+ // is dropped.
+ Future<bool> isPrimary(idOrAsset) {
+ var id = idOrAsset is AssetId ? idOrAsset : idOrAsset.id;
+ return new Future.value(
// nothing is filtered in debug mode
options.releaseMode &&
// TODO(sigmund): remove this exclusion once we have dev_transformers
// (dartbug.com/14187)
- input.id.path.startsWith('web/') &&
+ id.path.startsWith('web/') &&
// may filter non-entry HTML files and internal artifacts
- (input.id.extension == '.html' || input.id.extension == '.scriptUrls') &&
+ (id.extension == '.html' || id.extension == '.scriptUrls') &&
// keep any entry points
- !options.isHtmlEntryPoint(input.id));
+ !options.isHtmlEntryPoint(id));
+ }
Future apply(Transform transform) {
if (transform.primaryInput.id.extension == '.scriptUrls') {
« no previous file with comments | « pkg/observe/pubspec.yaml ('k') | pkg/polymer/lib/src/build/import_inliner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698