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

Unified Diff: pkg/polymer/lib/src/emitters.dart

Issue 22801009: Bring the rest of the polymer.dart code from github. (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
« no previous file with comments | « pkg/polymer/lib/polymer_element.dart ('k') | samples/third_party/todomvc/web/editable_label.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/lib/src/emitters.dart
diff --git a/pkg/polymer/lib/src/emitters.dart b/pkg/polymer/lib/src/emitters.dart
index 2e4e008f472d83b28768a32490695fd22086f714..dbd6816ab60a7119fc540b9173310465c07dfad6 100644
--- a/pkg/polymer/lib/src/emitters.dart
+++ b/pkg/polymer/lib/src/emitters.dart
@@ -49,10 +49,6 @@ NestedPrinter generateBootstrapCode(
..addLine('')
..addLine("import 'package:polymer/polymer.dart';")
..addLine("import 'dart:mirrors' show currentMirrorSystem;");
- if (userMainInfo.userCode != null) {
- printer..addLine("import '${pathMapper.importUrlFor(info, userMainInfo)}' "
- "as userMain;\n");
- }
int i = 0;
for (var c in global.components.values) {
@@ -60,6 +56,10 @@ NestedPrinter generateBootstrapCode(
printer.addLine("import '${pathMapper.importUrlFor(info, c)}' as i$i;");
i++;
}
+ if (userMainInfo.userCode != null) {
+ printer..addLine("import '${pathMapper.importUrlFor(info, userMainInfo)}' "
+ "as i$i;\n");
+ }
printer..addLine('')
..addLine('void main() {')
@@ -72,10 +72,13 @@ NestedPrinter generateBootstrapCode(
printer.addLine("'${pathMapper.importUrlFor(info, c)}',");
}
+ if (userMainInfo.userCode != null) {
+ printer.addLine("'${pathMapper.importUrlFor(info, userMainInfo)}',");
+ }
+
return printer
..indent -= 1
..addLine('],')
- ..addLine(userMainInfo.userCode != null ? 'userMain.main,' : '() {},')
..addLine(
"currentMirrorSystem().findLibrary(const Symbol('app_bootstrap'))")
..indent += 2
« no previous file with comments | « pkg/polymer/lib/polymer_element.dart ('k') | samples/third_party/todomvc/web/editable_label.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698