Index: lib/src/codegen/js_codegen.dart |
diff --git a/lib/src/codegen/js_codegen.dart b/lib/src/codegen/js_codegen.dart |
index 028a5152f56f0ae9ab30c4dd018c910a93fdb44d..16cd725d030d0a2863283dcc09c4c6890a6d6770 100644 |
--- a/lib/src/codegen/js_codegen.dart |
+++ b/lib/src/codegen/js_codegen.dart |
@@ -1926,7 +1926,7 @@ class JSGenerator extends CodeGenerator { |
JSGenerator(String outDir, Uri root, TypeRules rules, this.options) |
: super(outDir, root, rules); |
- void generateLibrary(Iterable<CompilationUnit> units, LibraryInfo info, |
+ String generateLibrary(Iterable<CompilationUnit> units, LibraryInfo info, |
CheckerReporter reporter) { |
JS.Program jsTree = |
new JSCodegenVisitor(info, rules).generateLibrary(units, reporter); |
@@ -1941,10 +1941,14 @@ class JSGenerator extends CodeGenerator { |
printer, path.dirname(outputPath)), jsTree); |
printer.add('//# sourceMappingURL=$outFilename.map'); |
// Write output file and source map |
- new File(outputPath).writeAsStringSync(printer.text); |
+ var text = printer.text; |
+ new File(outputPath).writeAsStringSync(text); |
new File('$outputPath.map').writeAsStringSync(printer.map); |
+ return computeHash(text); |
} else { |
- new File(outputPath).writeAsStringSync(jsNodeToString(jsTree)); |
+ var text = jsNodeToString(jsTree); |
+ new File(outputPath).writeAsStringSync(text); |
+ return computeHash(text); |
} |
} |
} |