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

Unified Diff: pkg/polymer/lib/src/transform/common.dart

Issue 23478015: Apply several phases only to entrypoint files (which currently are identified as (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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
Index: pkg/polymer/lib/src/transform/common.dart
diff --git a/pkg/polymer/lib/src/transform/common.dart b/pkg/polymer/lib/src/transform/common.dart
index f20d836f7f71055d1094fdad196cd286f013d567..72abba952de15d53d84d80cb4c192f9e41425a34 100644
--- a/pkg/polymer/lib/src/transform/common.dart
+++ b/pkg/polymer/lib/src/transform/common.dart
@@ -72,3 +72,9 @@ AssetId resolve(AssetId source, String url, TransformLogger logger, Span span) {
}
return new AssetId(package, targetPath);
}
+
+/** Whether an asset with [id] is considered a primary entry point HTML file. */
+Future<bool> isPrimaryHtml(AssetId id) =>
+ new Future.value(id.extension == '.html' &&
+ // Note: [id.path] is a relative path from the root of a package.
+ (id.path.startsWith('web/') || id.path.startsWith('test/')));
« no previous file with comments | « pkg/polymer/lib/src/transform/code_extractor.dart ('k') | pkg/polymer/lib/src/transform/import_inliner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698