Index: lib/src/info.dart |
diff --git a/lib/src/info.dart b/lib/src/info.dart |
index e69f6973219b58219be824253628a66b8f3fdd7e..7d3d347c4b455303946682ff50f6b2e434f683ae 100644 |
--- a/lib/src/info.dart |
+++ b/lib/src/info.dart |
@@ -161,7 +161,7 @@ typedef String NameMangler(String name, String suffix, [bool forceSuffix]); |
abstract class LibraryInfo { |
/** Whether there is any code associated with the page/component. */ |
- bool get codeAttached => inlinedCode != null || externalFile != null; |
+ bool get codeAttached => userCode != null || externalFile != null; |
/** |
* The actual code, either inlined or from an external file, or `null` if none |
@@ -169,15 +169,18 @@ abstract class LibraryInfo { |
*/ |
DartCodeInfo userCode; |
- /** The inlined code, if any. */ |
- String inlinedCode; |
- |
/** The name of the file sourced in a script tag, if any. */ |
Path externalFile; |
/** Info asscociated with [externalFile], if any. */ |
FileInfo externalCode; |
+ /** |
+ * The inverse of [externalCode]. If this .dart file was imported via a script |
+ * tag, this refers to the HTML file that imported it. |
+ */ |
+ FileInfo htmlFile; |
+ |
/** File where the top-level code was defined. */ |
Path get inputPath; |
@@ -187,6 +190,15 @@ abstract class LibraryInfo { |
*/ |
String _getOutputFilename(NameMangler mangle); |
+ /** This is used in transforming Dart code to track modified files. */ |
+ bool modified = false; |
+ |
+ /** |
+ * This is used in transforming Dart code to compute files that reference |
+ * [modified] files. |
+ */ |
+ List<FileInfo> referencedBy = []; |
+ |
/** |
* Components used within this library unit. For [FileInfo] these are |
* components used directly in the page. For [ComponentInfo] these are |
@@ -636,7 +648,7 @@ class DartCodeInfo { |
final List<DartDirectiveInfo> directives; |
/** The rest of the code. */ |
- final String code; |
+ String code; |
DartCodeInfo(this.libraryName, this.partOf, this.directives, this.code); |
} |
@@ -658,6 +670,9 @@ class DartDirectiveInfo { |
/** Shown identifiers. */ |
List<String> show; |
+ /** True if this directive should refer to a generated file. */ |
+ bool generated = false; |
+ |
DartDirectiveInfo(this.label, this.uri, [this.prefix, this.hide, this.show]); |
} |