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

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

Issue 589743002: warn if inlining the same css file more than once (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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/test/build/import_inliner_test.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 51795db6a0eaa752415c9673692a35fcc83e2437..46ccd4ca92dac027c784843483d4ea737c9c1b9a 100644
--- a/pkg/polymer/lib/src/build/messages.dart
+++ b/pkg/polymer/lib/src/build/messages.dart
@@ -539,3 +539,22 @@ Custom element found in document body without an "unresolved" attribute on it or
one of its parents. This means your app probably has a flash of unstyled content
before it finishes loading. See <http://goo.gl/iN03Pj> for more info.
''');
+
+const CSS_FILE_INLINED_MULTIPLE_TIMES = const MessageTemplate(
+ const MessageId('polymer', 42),
+ 'A css file is being inlined in multiple places for a single entry point.',
Siggi Cherem (dart-lang) 2014/09/19 21:13:36 Some ideas: - 'is being inlined' => 'was inlined'
jakemac 2014/09/19 21:38:16 Added in the %-url-% placeholder, but we can't put
Siggi Cherem (dart-lang) 2014/09/19 22:11:34 Ah, sorry I meant if you wanted to include some de
+ 'Css file inlined multiple times',
+ '''
+Css files are inlined by default, but if you import the same one in multiple
+places you probably want to override this behavior to prevent duplicate code.
+To do this, use the following pattern to update your pubspec.yaml:
+
+ transformers:
+ - polymer:
+ inline_stylesheets:
+ web/my_file.css: false
+
+If you would like to hide this warning and keep it inlined, do the same thing
+but assign the value to true.
+'''
+);
« no previous file with comments | « pkg/polymer/lib/src/build/import_inliner.dart ('k') | pkg/polymer/test/build/import_inliner_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698