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

Side by Side Diff: pkg/polymer/lib/src/build/linter.dart

Issue 644163002: Splitting interop support so `dart_support.js` is no longer required. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/polymer/CHANGELOG.md ('k') | pkg/polymer/lib/src/build/messages.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /// Logic to validate that developers are correctly using Polymer constructs. 5 /// Logic to validate that developers are correctly using Polymer constructs.
6 /// This is mainly used to produce warnings for feedback in the editor. 6 /// This is mainly used to produce warnings for feedback in the editor.
7 library polymer.src.build.linter; 7 library polymer.src.build.linter;
8 8
9 import 'dart:async'; 9 import 'dart:async';
10 import 'dart:convert'; 10 import 'dart:convert';
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 var src = node.attributes['src']; 302 var src = node.attributes['src'];
303 303
304 if (isDart) { 304 if (isDart) {
305 if (_dartTagSeen) _logger.warning(ONLY_ONE_TAG, span: node.sourceSpan); 305 if (_dartTagSeen) _logger.warning(ONLY_ONE_TAG, span: node.sourceSpan);
306 if (_isEntryPoint && _polymerExperimentalHtmlSeen) { 306 if (_isEntryPoint && _polymerExperimentalHtmlSeen) {
307 _logger.warning(NO_DART_SCRIPT_AND_EXPERIMENTAL, span: node.sourceSpan); 307 _logger.warning(NO_DART_SCRIPT_AND_EXPERIMENTAL, span: node.sourceSpan);
308 } 308 }
309 _dartTagSeen = true; 309 _dartTagSeen = true;
310 } 310 }
311 311
312 if (src != null && src.endsWith('web_components/dart_support.js')) {
313 _logger.warning(DART_SUPPORT_NO_LONGER_REQUIRED, span: node.sourceSpan);
314 }
315
312 var isEmpty = node.innerHtml.trim() == ''; 316 var isEmpty = node.innerHtml.trim() == '';
313 317
314 if (src == null) { 318 if (src == null) {
315 if (isDart && isEmpty) { 319 if (isDart && isEmpty) {
316 _logger.warning(SCRIPT_TAG_SEEMS_EMPTY, span: node.sourceSpan); 320 _logger.warning(SCRIPT_TAG_SEEMS_EMPTY, span: node.sourceSpan);
317 } 321 }
318 return; 322 return;
319 } 323 }
320 324
321 if (src.endsWith('.dart') && !isDart) { 325 if (src.endsWith('.dart') && !isDart) {
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 upDirCount = segments.length - 2; 452 upDirCount = segments.length - 2;
449 } 453 }
450 var reachOutPrefix = '../' * upDirCount; 454 var reachOutPrefix = '../' * upDirCount;
451 return USE_POLYMER_HTML.create({'reachOutPrefix': reachOutPrefix}); 455 return USE_POLYMER_HTML.create({'reachOutPrefix': reachOutPrefix});
452 } 456 }
453 457
454 const List<String> INTERNALLY_DEFINED_ELEMENTS = 458 const List<String> INTERNALLY_DEFINED_ELEMENTS =
455 const ['auto-binding-dart', 'polymer-element']; 459 const ['auto-binding-dart', 'polymer-element'];
456 const List<String> AUTO_BINDING_ELEMENTS = 460 const List<String> AUTO_BINDING_ELEMENTS =
457 const ['auto-binding-dart', 'auto-binding']; 461 const ['auto-binding-dart', 'auto-binding'];
OLDNEW
« no previous file with comments | « pkg/polymer/CHANGELOG.md ('k') | pkg/polymer/lib/src/build/messages.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698