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

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, 4 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..cad687099e3e36f7a1f5ff16db72146ab1c15637 100644
--- a/pkg/polymer/lib/src/transform/common.dart
+++ b/pkg/polymer/lib/src/transform/common.dart
@@ -18,7 +18,7 @@ import 'package:source_maps/span.dart' show Span;
* error/warning to [logger].
*/
Document parseHtml(String contents, String sourcePath, TransformLogger logger,
- {bool checkDocType: true}) {
+ {bool checkDocType: false}) {
// TODO(jmesserly): make HTTP encoding configurable
var parser = new HtmlParser(contents, encoding: 'utf8', generateSpans: true,
sourceUrl: sourcePath);
@@ -72,3 +72,7 @@ AssetId resolve(AssetId source, String url, TransformLogger logger, Span span) {
}
return new AssetId(package, targetPath);
}
+
+Future<bool> isHtmlInWebOrTest(AssetId id) =>
Jennifer Messerly 2013/09/04 02:35:04 wondering if we could name this to more reflect wh
Siggi Cherem (dart-lang) 2013/09/04 16:30:16 Done. Went with isPrimaryHtml
+ new Future.value(id.extension == '.html' &&
Jennifer Messerly 2013/09/04 02:35:04 hmm. Perhaps add a comment that these are always a
Siggi Cherem (dart-lang) 2013/09/04 16:30:16 Done
+ (id.path.startsWith('web/') || id.path.startsWith('test/')));

Powered by Google App Engine
This is Rietveld 408576698