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

Unified Diff: lib/src/files.dart

Issue 12474002: Support for parsing all CSS and producing one CSS file (Closed) Base URL: https://github.com/dart-lang/web-ui.git@master
Patch Set: merged Created 7 years, 9 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: lib/src/files.dart
diff --git a/lib/src/files.dart b/lib/src/files.dart
index 6763c2fe43dad4afa2dba55566b2173a2cedd34b..f7d727c1210a7ec618c50e8749424f48d45c089f 100644
--- a/lib/src/files.dart
+++ b/lib/src/files.dart
@@ -10,13 +10,22 @@ import 'info.dart';
/** An input file to process by the template compiler. */
class SourceFile {
+ static const int HTML = 1;
+ static const int DART = 2;
+ static const int STYLESHEET = 3;
+
final Path path;
+ final int fileType;
Siggi Cherem (dart-lang) 2013/03/07 22:14:20 how about simply 'type' (since we are inside Sourc
terry 2013/03/08 20:11:24 Done.
- final bool isDart;
Document document;
String code;
+ String linkedCssContent;
Siggi Cherem (dart-lang) 2013/03/07 22:14:20 I think I prefer to simply reuse 'code' for this t
terry 2013/03/08 20:11:24 Done.
+
+ SourceFile(this.path, {this.fileType: HTML});
- SourceFile(this.path, {this.isDart: false});
+ bool get isDart => fileType == DART;
+ bool get isHtml => fileType == HTML;
+ bool get isStyleSheet => fileType == STYLESHEET;
String toString() => "<#SourceFile $path>";
}

Powered by Google App Engine
This is Rietveld 408576698