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

Unified Diff: pkg/polymer/lib/src/build/messages.dart

Issue 662013004: fix duplicate script issue (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review updates Created 6 years, 2 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/src/build/import_inliner.dart ('k') | pkg/polymer/lib/src/mirror_loader.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/lib/src/build/messages.dart
diff --git a/pkg/polymer/lib/src/build/messages.dart b/pkg/polymer/lib/src/build/messages.dart
index 24b88b649acefdce41c237b6af67f0dd5745dac7..86335fdcafd88891ec2fe785c47c89933a6b3755 100644
--- a/pkg/polymer/lib/src/build/messages.dart
+++ b/pkg/polymer/lib/src/build/messages.dart
@@ -580,3 +580,26 @@ half. Developers of packages that wrap JavaScript custom elements (like
application developers don't have to worry about it anymore.
'''
);
+
+const SCRIPT_INCLUDED_MORE_THAN_ONCE = const MessageTemplate(
+ const MessageId('polymer', 44),
+ 'The `%-url-%` script was included more than once.',
+ 'Dart script file included more than once.',
+ '''
+Duplicate dart scripts often happen if you have multiple html imports that
+include the same script. The simplest workaround for this is to move your dart
+script to its own html file, and import that instead of the script (html imports
+are automatically deduped).
+
+For example:
+
+ <script type="application/dart" src="foo.dart"></script>
+
+Should turn into:
+
+ <link rel="import" href="foo.html">
+
+And `foo.html` should look like:
+
+ <script type="application/dart" src="foo.dart"></script>
+''');
« no previous file with comments | « pkg/polymer/lib/src/build/import_inliner.dart ('k') | pkg/polymer/lib/src/mirror_loader.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698